Class FloorInfluence
java.lang.Object
com.ardor3d.extension.effect.particle.ParticleInfluence
com.ardor3d.extension.effect.particle.FloorInfluence
- All Implemented Interfaces:
Savable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply the influence defined by this class on a given particle.double
Class
<? extends FloorInfluence> double
getFloor()
void
read
(InputCapsule capsule) void
setBounciness
(double bounciness) void
setConstant
(double constant) void
setFloor
(ReadOnlyPlane floor) void
void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.extension.effect.particle.ParticleInfluence
isEnabled, prepare, setEnabled
-
Constructor Details
-
FloorInfluence
public FloorInfluence() -
FloorInfluence
- Parameters:
plane
- The imaginary floor planebounciness
- Bounciness is the factor of multiplication when bouncing off the floor. A bounciness factor of 1 means the ball leaves the floor with the same velocity as it hit the floor, much like a rubber ball.
-
-
Method Details
-
apply
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 classParticleInfluence
- 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.
-
getBounciness
public double getBounciness() -
setBounciness
public void setBounciness(double bounciness) -
getFloor
-
setFloor
-
getNormal
-
setNormal
-
getConstant
public double getConstant() -
setConstant
public void setConstant(double constant) -
getClassTag
- Specified by:
getClassTag
in interfaceSavable
- Overrides:
getClassTag
in classParticleInfluence
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classParticleInfluence
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classParticleInfluence
- Throws:
IOException
-