Codota Logo
ParticleEmitter.getUserData
Code IndexAdd Codota to your IDE (free)

How to use
getUserData
method
in
com.jme3.effect.ParticleEmitter

Best Java code snippets using com.jme3.effect.ParticleEmitter.getUserData (Showing top 15 results out of 315)

  • Common ways to obtain ParticleEmitter
private void myMethod () {
ParticleEmitter p =
  • Codota IconGeometry geometry;(ParticleEmitter) geometry.clone(cloneMaterial)
  • Codota IconInputCapsule inputCapsule;String str;(ParticleEmitter) inputCapsule.readSavable(str, null)
  • Smart code suggestions by Codota
}
origin: jMonkeyEngine/jmonkeyengine

private void removeUserData(EffectTrack effectTrack) {
  //fetching the UserData TrackInfo.
  TrackInfo data = (TrackInfo) effectTrack.emitter.getUserData("TrackInfo");
  //if it does not exist, we create it and attach it to the emitter.
  if (data == null) {
    return;
  }
  //removing the given Track to the TrackInfo.
  data.getTracks().remove(effectTrack);
}
origin: jMonkeyEngine/jmonkeyengine

@Override
public void cleanUp() {
  TrackInfo t = (TrackInfo) emitter.getUserData("TrackInfo");
  t.getTracks().remove(this);
  if (t.getTracks().isEmpty()) {
    emitter.setUserData("TrackInfo", null);
  }
}
origin: jMonkeyEngine/jmonkeyengine

private void setUserData(EffectTrack effectTrack) {
  //fetching the UserData TrackInfo.
  TrackInfo data = (TrackInfo) effectTrack.emitter.getUserData("TrackInfo");
  //if it does not exist, we create it and attach it to the emitter.
  if (data == null) {
    data = new TrackInfo();
    effectTrack.emitter.setUserData("TrackInfo", data);
  }
  //adding the given Track to the TrackInfo.
  data.addTrack(effectTrack);
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * recursive function responsible for finding the newly cloned Emitter
 *
 * @param spat
 * @return
 */
private ParticleEmitter findEmitter(Spatial spat) {
  if (spat instanceof ParticleEmitter) {
    //spat is a PArticleEmitter
    ParticleEmitter em = (ParticleEmitter) spat;
    //getting the UserData TrackInfo so check if it should be attached to this Track
    TrackInfo t = (TrackInfo) em.getUserData("TrackInfo");
    if (t != null && t.getTracks().contains(this)) {
      return em;
    }
    return null;
  } else if (spat instanceof Node) {
    for (Spatial child : ((Node) spat).getChildren()) {
      ParticleEmitter em = findEmitter(child);
      if (em != null) {
        return em;
      }
    }
  }
  return null;
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Sets the Emitter to use in this track
 *
 * @param emitter
 */
public void setEmitter(ParticleEmitter emitter) {
  if (this.emitter != null) {
    TrackInfo data = (TrackInfo) emitter.getUserData("TrackInfo");
    data.getTracks().remove(this);
  }
  this.emitter = emitter;
  //saving particles per second value
  this.particlesPerSeconds = emitter.getParticlesPerSec();
  //setting the emmitter to not emmit.
  this.emitter.setParticlesPerSec(0);
  setUserData(this);
}
origin: org.jmonkeyengine/jme3-core

private void removeUserData(EffectTrack effectTrack) {
  //fetching the UserData TrackInfo.
  TrackInfo data = (TrackInfo) effectTrack.emitter.getUserData("TrackInfo");
  //if it does not exist, we create it and attach it to the emitter.
  if (data == null) {
    return;
  }
  //removing the given Track to the TrackInfo.
  data.getTracks().remove(effectTrack);
}
origin: info.projectkyoto/mms-engine

private void removeUserData(EffectTrack effectTrack) {
  //fetching the UserData TrackInfo.
  TrackInfo data = (TrackInfo) effectTrack.emitter.getUserData("TrackInfo");
  //if it does not exist, we create it and attach it to the emitter.
  if (data == null) {
    return;
  }
  //removing the given Track to the TrackInfo.
  data.getTracks().remove(effectTrack);
}
origin: org.jmonkeyengine/jme3-core

public void cleanUp() {
  TrackInfo t = (TrackInfo) emitter.getUserData("TrackInfo");
  t.getTracks().remove(this);
  if (t.getTracks().isEmpty()) {
    emitter.setUserData("TrackInfo", null);
  }
}
origin: info.projectkyoto/mms-engine

public void cleanUp() {
  TrackInfo t = (TrackInfo) emitter.getUserData("TrackInfo");
  t.getTracks().remove(this);
  if (t.getTracks().isEmpty()) {
    emitter.setUserData("TrackInfo", null);
  }
}
origin: info.projectkyoto/mms-engine

private void setUserData(EffectTrack effectTrack) {
  //fetching the UserData TrackInfo.
  TrackInfo data = (TrackInfo) effectTrack.emitter.getUserData("TrackInfo");
  //if it does not exist, we create it and attach it to the emitter.
  if (data == null) {
    data = new TrackInfo();
    effectTrack.emitter.setUserData("TrackInfo", data);
  }
  //adding the given Track to the TrackInfo.
  data.addTrack(effectTrack);
}
origin: org.jmonkeyengine/jme3-core

private void setUserData(EffectTrack effectTrack) {
  //fetching the UserData TrackInfo.
  TrackInfo data = (TrackInfo) effectTrack.emitter.getUserData("TrackInfo");
  //if it does not exist, we create it and attach it to the emitter.
  if (data == null) {
    data = new TrackInfo();
    effectTrack.emitter.setUserData("TrackInfo", data);
  }
  //adding the given Track to the TrackInfo.
  data.addTrack(effectTrack);
}
origin: org.jmonkeyengine/jme3-core

/**
 * recursive function responsible for finding the newly cloned Emitter
 *
 * @param spat
 * @return
 */
private ParticleEmitter findEmitter(Spatial spat) {
  if (spat instanceof ParticleEmitter) {
    //spat is a PArticleEmitter
    ParticleEmitter em = (ParticleEmitter) spat;
    //getting the UserData TrackInfo so check if it should be attached to this Track
    TrackInfo t = (TrackInfo) em.getUserData("TrackInfo");
    if (t != null && t.getTracks().contains(this)) {
      return em;
    }
    return null;
  } else if (spat instanceof Node) {
    for (Spatial child : ((Node) spat).getChildren()) {
      ParticleEmitter em = findEmitter(child);
      if (em != null) {
        return em;
      }
    }
  }
  return null;
}
origin: info.projectkyoto/mms-engine

/**
 * recursive function responsible for finding the newly cloned Emitter
 *
 * @param spat
 * @return
 */
private ParticleEmitter findEmitter(Spatial spat) {
  if (spat instanceof ParticleEmitter) {
    //spat is a PArticleEmitter
    ParticleEmitter em = (ParticleEmitter) spat;
    //getting the UserData TrackInfo so check if it should be attached to this Track
    TrackInfo t = (TrackInfo) em.getUserData("TrackInfo");
    if (t != null && t.getTracks().contains(this)) {
      return em;
    }
    return null;
  } else if (spat instanceof Node) {
    for (Spatial child : ((Node) spat).getChildren()) {
      ParticleEmitter em = findEmitter(child);
      if (em != null) {
        return em;
      }
    }
  }
  return null;
}
origin: org.jmonkeyengine/jme3-core

/**
 * Sets the Emitter to use in this track
 *
 * @param emitter
 */
public void setEmitter(ParticleEmitter emitter) {
  if (this.emitter != null) {
    TrackInfo data = (TrackInfo) emitter.getUserData("TrackInfo");
    data.getTracks().remove(this);
  }
  this.emitter = emitter;
  //saving particles per second value
  this.particlesPerSeconds = emitter.getParticlesPerSec();
  //setting the emmitter to not emmit.
  this.emitter.setParticlesPerSec(0);
  setUserData(this);
}
origin: info.projectkyoto/mms-engine

/**
 * Sets the Emitter to use in this track
 *
 * @param emitter
 */
public void setEmitter(ParticleEmitter emitter) {
  if (this.emitter != null) {
    TrackInfo data = (TrackInfo) emitter.getUserData("TrackInfo");
    data.getTracks().remove(this);
  }
  this.emitter = emitter;
  //saving particles per second value
  this.particlesPerSeconds = emitter.getParticlesPerSec();
  //setting the emmitter to not emmit.
  this.emitter.setParticlesPerSec(0);
  setUserData(this);
}
com.jme3.effectParticleEmittergetUserData

Popular methods of ParticleEmitter

  • emitAllParticles
    Instantly emits all the particles possible to be emitted. Any particles which are currently inactive
  • getName
  • setQueueBucket
  • getMaterial
  • setParticlesPerSec
    Set the number of particles to spawn per second.
  • <init>
  • clone
  • getNumVisibleParticles
    Returns the number of visible particles (spawned but not dead).
  • setEndColor
    Set the end color of the particles spawned.The particle color at any time is determined by blending
  • setEndSize
    Set the end size of the particles spawned.The particle size at any time is determined by blending th
  • setGravity
    This method sets the gravity vector.
  • setHighLife
    Set the high value of life.The particle's lifetime/expiration is determined by randomly selecting a
  • setGravity,
  • setHighLife,
  • setLowLife,
  • setMaterial,
  • setNumParticles,
  • setShadowMode,
  • setStartColor,
  • setStartSize,
  • addControl,
  • emitParticle

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Path (java.nio.file)
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now