Class RadialParticleInfluencer

java.lang.Object
com.jme3.effect.influencers.DefaultParticleInfluencer
com.jme3.effect.influencers.RadialParticleInfluencer
All Implemented Interfaces:
ParticleInfluencer, Savable, JmeCloneable, Cloneable

public class RadialParticleInfluencer extends DefaultParticleInfluencer
an influencer to make blasts expanding on the ground. can be used for various other things
  • Constructor Details

    • RadialParticleInfluencer

      public RadialParticleInfluencer()
  • Method Details

    • applyVelocityVariation

      protected void applyVelocityVariation(Particle particle)
      This method applies the variation to the particle with already set velocity.
      Overrides:
      applyVelocityVariation in class DefaultParticleInfluencer
      Parameters:
      particle - the particle to be affected
    • getOrigin

      public Vector3f getOrigin()
      the origin used for computing the radial velocity direction
      Returns:
      the origin
    • setOrigin

      public void setOrigin(Vector3f origin)
      the origin used for computing the radial velocity direction
      Parameters:
      origin - the desired origin location (alias created)
    • getRadialVelocity

      public float getRadialVelocity()
      the radial velocity
      Returns:
      radialVelocity
    • setRadialVelocity

      public void setRadialVelocity(float radialVelocity)
      the radial velocity
      Parameters:
      radialVelocity - the desired speed
    • isHorizontal

      public boolean isHorizontal()
      nullify y component of particle velocity to make the effect expand only on x and z axis
      Returns:
      true if nullifying, otherwise false
    • setHorizontal

      public void setHorizontal(boolean horizontal)
      nullify y component of particle velocity to make the effect expand only on x and z axis
      Parameters:
      horizontal - true to zero the Y component, false to preserve it
    • cloneFields

      public void cloneFields(Cloner cloner, Object original)
      Called internally by com.jme3.util.clone.Cloner. Do not call directly.
      Specified by:
      cloneFields in interface JmeCloneable
      Overrides:
      cloneFields in class DefaultParticleInfluencer
      Parameters:
      cloner - The cloner that is performing the cloning operation. The cloneFields method can call back into the cloner to make clones of its subordinate fields.
      original - The original object from which this object was cloned. This is provided for the very rare case that this object needs to refer to its original for some reason. In general, all of the relevant values should have been transferred during the shallow clone, and this object need only clone what it wants.
    • write

      public void write(JmeExporter ex) throws IOException
      Specified by:
      write in interface Savable
      Overrides:
      write in class DefaultParticleInfluencer
      Throws:
      IOException
    • read

      public void read(JmeImporter im) throws IOException
      Specified by:
      read in interface Savable
      Overrides:
      read in class DefaultParticleInfluencer
      Throws:
      IOException