Tabnine Logo
ParticleEmitter.getUserData
Code IndexAdd Tabnine 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)

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

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • findViewById (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • BoxLayout (javax.swing)
  • JLabel (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now