Package com.jme3.effect.influencers
Class RadialParticleInfluencer
java.lang.Object
com.jme3.effect.influencers.DefaultParticleInfluencer
com.jme3.effect.influencers.RadialParticleInfluencer
- All Implemented Interfaces:
ParticleInfluencer
,Savable
,JmeCloneable
,Cloneable
an influencer to make blasts expanding on the ground. can be used for various other things
-
Field Summary
Fields inherited from class com.jme3.effect.influencers.DefaultParticleInfluencer
initialVelocity, SAVABLE_VERSION, temp, velocityVariation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyVelocityVariation
(Particle particle) This method applies the variation to the particle with already set velocity.void
cloneFields
(Cloner cloner, Object original) Called internally by com.jme3.util.clone.Cloner.the origin used for computing the radial velocity directionfloat
the radial velocityboolean
nullify y component of particle velocity to make the effect expand only on x and z axisvoid
read
(JmeImporter im) void
setHorizontal
(boolean horizontal) nullify y component of particle velocity to make the effect expand only on x and z axisvoid
the origin used for computing the radial velocity directionvoid
setRadialVelocity
(float radialVelocity) the radial velocityvoid
write
(JmeExporter ex) Methods inherited from class com.jme3.effect.influencers.DefaultParticleInfluencer
clone, getInitialVelocity, getVelocityVariation, influenceParticle, jmeClone, setInitialVelocity, setVelocityVariation
-
Constructor Details
-
RadialParticleInfluencer
public RadialParticleInfluencer()
-
-
Method Details
-
applyVelocityVariation
This method applies the variation to the particle with already set velocity.- Overrides:
applyVelocityVariation
in classDefaultParticleInfluencer
- Parameters:
particle
- the particle to be affected
-
getOrigin
the origin used for computing the radial velocity direction- Returns:
- the origin
-
setOrigin
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
Called internally by com.jme3.util.clone.Cloner. Do not call directly.- Specified by:
cloneFields
in interfaceJmeCloneable
- Overrides:
cloneFields
in classDefaultParticleInfluencer
- 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
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classDefaultParticleInfluencer
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classDefaultParticleInfluencer
- Throws:
IOException
-