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
Modifier and TypeFieldDescriptionprotected float
Normal to emitter's shape factor.protected float
Emitter's surface tangent factor.protected float
Emitters tangent rotation factor.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.clone()
This method clones the influencer instance.float
This method returns the normal velocity factor.float
This method returns the surface tangent factor.float
This method returns the surface tangent rotation factor.void
influenceParticle
(Particle particle, EmitterShape emitterShape) This method influences the particle.void
read
(JmeImporter im) void
setNormalVelocity
(float normalVelocity) This method sets the normal velocity factor.void
setSurfaceTangentFactor
(float surfaceTangentFactor) This method sets the surface tangent factor.void
setSurfaceTangentRotation
(float surfaceTangentRotation) This method sets the surface tangent rotation factor.void
write
(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:ParticleInfluencer
This method influences the particle.- Specified by:
influenceParticle
in interfaceParticleInfluencer
- Overrides:
influenceParticle
in 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:DefaultParticleInfluencer
This method applies the variation to the particle with already set velocity.- Overrides:
applyVelocityVariation
in classDefaultParticleInfluencer
- Parameters:
particle
- the particle to be affected
-
clone
Description copied from interface:ParticleInfluencer
This method clones the influencer instance.- Specified by:
clone
in interfaceParticleInfluencer
- Overrides:
clone
in classDefaultParticleInfluencer
- Returns:
- cloned instance
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classDefaultParticleInfluencer
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classDefaultParticleInfluencer
- Throws:
IOException
-