Class FloorInfluence
java.lang.Object
com.ardor3d.extension.effect.particle.ParticleInfluence
com.ardor3d.extension.effect.particle.FloorInfluence
- All Implemented Interfaces:
Savable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApply the influence defined by this class on a given particle.doubleClass<? extends FloorInfluence> doublegetFloor()voidread(InputCapsule capsule) voidsetBounciness(double bounciness) voidsetConstant(double constant) voidsetFloor(ReadOnlyPlane floor) voidvoidwrite(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:ParticleInfluenceApply 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:
applyin 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:
getClassTagin interfaceSavable- Overrides:
getClassTagin classParticleInfluence
-
write
- Specified by:
writein interfaceSavable- Overrides:
writein classParticleInfluence- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Overrides:
readin classParticleInfluence- Throws:
IOException
-