Package com.jme3.effect.influencers
Class EmptyParticleInfluencer
java.lang.Object
com.jme3.effect.influencers.EmptyParticleInfluencer
- All Implemented Interfaces:
ParticleInfluencer,Savable,JmeCloneable,Cloneable
This influencer does not influence particle at all.
It makes particles not to move.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()This method clones the influencer instance.voidcloneFields(Cloner cloner, Object original) Called internally by com.jme3.util.clone.Cloner.This method returns the initial velocity.floatThis method returns the velocity variation.voidinfluenceParticle(Particle particle, EmitterShape emitterShape) This method influences the particle.jmeClone()Called internally by com.jme3.util.clone.Cloner.voidread(JmeImporter im) voidsetInitialVelocity(Vector3f initialVelocity) voidsetVelocityVariation(float variation) voidwrite(JmeExporter ex)
-
Constructor Details
-
EmptyParticleInfluencer
public EmptyParticleInfluencer()
-
-
Method Details
-
write
- Specified by:
writein interfaceSavable- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Throws:
IOException
-
influenceParticle
Description copied from interface:ParticleInfluencerThis method influences the particle.- Specified by:
influenceParticlein interfaceParticleInfluencer- Parameters:
particle- particle to be influencedemitterShape- the shape of its emitter
-
setInitialVelocity
- Specified by:
setInitialVelocityin interfaceParticleInfluencer- Parameters:
initialVelocity- Set the initial velocity a particle is spawned with, the initial velocity given in the parameter will be varied according to the velocity variation set inParticleEmitter.setVelocityVariation(float). The particle will move with this velocity unless it is affected by gravity.
-
getInitialVelocity
Description copied from interface:ParticleInfluencerThis method returns the initial velocity.- Specified by:
getInitialVelocityin interfaceParticleInfluencer- Returns:
- the initial velocity
-
setVelocityVariation
public void setVelocityVariation(float variation) - Specified by:
setVelocityVariationin interfaceParticleInfluencer- Parameters:
variation- Set the variation by which the initial velocity of the particle is determined.variationshould be a value from 0 to 1, where 0 means particles are to spawn with exactly the velocity given inParticleEmitter.setInitialVelocity(com.jme3.math.Vector3f), and 1 means particles are to spawn with a completely random velocity.
-
getVelocityVariation
public float getVelocityVariation()Description copied from interface:ParticleInfluencerThis method returns the velocity variation.- Specified by:
getVelocityVariationin interfaceParticleInfluencer- Returns:
- the velocity variation
-
clone
Description copied from interface:ParticleInfluencerThis method clones the influencer instance.- Specified by:
clonein interfaceParticleInfluencer- Overrides:
clonein classObject- Returns:
- cloned instance
-
jmeClone
Called internally by com.jme3.util.clone.Cloner. Do not call directly.- Specified by:
jmeClonein interfaceJmeCloneable- Returns:
- a new instance
-
cloneFields
Called internally by com.jme3.util.clone.Cloner. Do not call directly.- Specified by:
cloneFieldsin interfaceJmeCloneable- 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.
-