com.jmex.effects.particles
Class FloorInfluence
java.lang.Object
com.jmex.effects.particles.ParticleInfluence
com.jmex.effects.particles.FloorInfluence
- All Implemented Interfaces:
- Savable
public class FloorInfluence
- extends ParticleInfluence
- Author:
- andgra
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FloorInfluence
public FloorInfluence(Vector3f pos,
Vector3f normal,
float bouncyness)
- Parameters:
pos
- The position vector for the (imaginary) center of the floor.normal
- The normal vector of the floor. Same semantics as in
math.Plane.bouncynessBouncyness
- is the factor of multiplication when bouncing off the floor. A
bouncyness factor of 1 means the ball leaves the floor with
the same velocity as it hit the floor, much like a rubber
ball.
apply
public void apply(float dt,
Particle particle,
int index)
- Description copied from class:
ParticleInfluence
- Apply the influence defined by this class on a given particle. Should
probably do this by making a call to
particle.getSpeed().addLocal(....); etc.
- Specified by:
apply
in class ParticleInfluence
- Parameters:
dt
- amount of time since last apply call in ms.particle
- the particle to apply the influence to.index
- the index of the particle we are working with. This is useful
for adding small steady amounts of variation, or remembering information.
getBouncyness
public float getBouncyness()
setBouncyness
public void setBouncyness(float bouncyness)
getFloor
public Plane getFloor()
setFloor
public void setFloor(Plane floor)
getNormal
public Vector3f getNormal()
setNormal
public void setNormal(Vector3f normal)
getPos
public Vector3f getPos()
setPos
public void setPos(Vector3f pos)