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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyVelocityVariation(Particle particle) This method applies the variation to the particle with already set velocity.voidcloneFields(Cloner cloner, Object original) Called internally by com.jme3.util.clone.Cloner.the origin used for computing the radial velocity directionfloatthe radial velocitybooleannullify y component of particle velocity to make the effect expand only on x and z axisvoidread(JmeImporter im) voidsetHorizontal(boolean horizontal) nullify y component of particle velocity to make the effect expand only on x and z axisvoidthe origin used for computing the radial velocity directionvoidsetRadialVelocity(float radialVelocity) the radial velocityvoidwrite(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:
applyVelocityVariationin 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:
cloneFieldsin interfaceJmeCloneable- Overrides:
cloneFieldsin 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:
writein interfaceSavable- Overrides:
writein classDefaultParticleInfluencer- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Overrides:
readin classDefaultParticleInfluencer- Throws:
IOException
-