Package com.jme3.effect.influencers
Class NewtonianParticleInfluencer
java.lang.Object
com.jme3.effect.influencers.DefaultParticleInfluencer
com.jme3.effect.influencers.NewtonianParticleInfluencer
- All Implemented Interfaces:
ParticleInfluencer,Savable,JmeCloneable,Cloneable
This influencer calculates initial velocity with the use of the emitter's shape.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatNormal to emitter's shape factor.protected floatEmitter's surface tangent factor.protected floatEmitters tangent rotation factor.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.clone()This method clones the influencer instance.floatThis method returns the normal velocity factor.floatThis method returns the surface tangent factor.floatThis method returns the surface tangent rotation factor.voidinfluenceParticle(Particle particle, EmitterShape emitterShape) This method influences the particle.voidread(JmeImporter im) voidsetNormalVelocity(float normalVelocity) This method sets the normal velocity factor.voidsetSurfaceTangentFactor(float surfaceTangentFactor) This method sets the surface tangent factor.voidsetSurfaceTangentRotation(float surfaceTangentRotation) This method sets the surface tangent rotation factor.voidwrite(JmeExporter ex) Methods inherited from class com.jme3.effect.influencers.DefaultParticleInfluencer
cloneFields, getInitialVelocity, getVelocityVariation, jmeClone, setInitialVelocity, setVelocityVariation
-
Field Details
-
normalVelocity
protected float normalVelocityNormal to emitter's shape factor. -
surfaceTangentFactor
protected float surfaceTangentFactorEmitter's surface tangent factor. -
surfaceTangentRotation
protected float surfaceTangentRotationEmitters tangent rotation factor.
-
-
Constructor Details
-
NewtonianParticleInfluencer
public NewtonianParticleInfluencer()Constructor. Sets velocity variation to 0.0f.
-
-
Method Details
-
influenceParticle
Description copied from interface:ParticleInfluencerThis method influences the particle.- Specified by:
influenceParticlein interfaceParticleInfluencer- Overrides:
influenceParticlein classDefaultParticleInfluencer- Parameters:
particle- particle to be influencedemitterShape- the shape of its emitter
-
getNormalVelocity
public float getNormalVelocity()This method returns the normal velocity factor.- Returns:
- the normal velocity factor
-
setNormalVelocity
public void setNormalVelocity(float normalVelocity) This method sets the normal velocity factor.- Parameters:
normalVelocity- the normal velocity factor
-
setSurfaceTangentFactor
public void setSurfaceTangentFactor(float surfaceTangentFactor) This method sets the surface tangent factor.- Parameters:
surfaceTangentFactor- the surface tangent factor
-
getSurfaceTangentFactor
public float getSurfaceTangentFactor()This method returns the surface tangent factor.- Returns:
- the surface tangent factor
-
setSurfaceTangentRotation
public void setSurfaceTangentRotation(float surfaceTangentRotation) This method sets the surface tangent rotation factor.- Parameters:
surfaceTangentRotation- the surface tangent rotation factor
-
getSurfaceTangentRotation
public float getSurfaceTangentRotation()This method returns the surface tangent rotation factor.- Returns:
- the surface tangent rotation factor
-
applyVelocityVariation
Description copied from class:DefaultParticleInfluencerThis method applies the variation to the particle with already set velocity.- Overrides:
applyVelocityVariationin classDefaultParticleInfluencer- Parameters:
particle- the particle to be affected
-
clone
Description copied from interface:ParticleInfluencerThis method clones the influencer instance.- Specified by:
clonein interfaceParticleInfluencer- Overrides:
clonein classDefaultParticleInfluencer- Returns:
- cloned instance
-
write
- Specified by:
writein interfaceSavable- Overrides:
writein classDefaultParticleInfluencer- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Overrides:
readin classDefaultParticleInfluencer- Throws:
IOException
-