|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.geom.particle.BoundingBoxParticleFunction
public class BoundingBoxParticleFunction
Clamps the position of a particle to within a BoundingBox.
This function should be applied after any other ParticleFunctions which modify a Particle's position (e.g. PhysicsFunction).
Constructor Summary | |
---|---|
BoundingBoxParticleFunction(float[] upper,
float[] lower)
Create a new bounding box function with the given initial bounds |
Method Summary | |
---|---|
boolean |
apply(Particle particle)
Notification that the system is about to do an update of the particles and to do any system-level initialisation. |
boolean |
isEnabled()
Check to see if this function has been enabled or not currently. |
boolean |
newFrame(int deltaT)
Apply this function to the given particle right now. |
void |
setEnabled(boolean state)
Set the enabled state of this function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BoundingBoxParticleFunction(float[] upper, float[] lower)
upper
- All positive corner of the boundslower
- All negative corner of the boundsMethod Detail |
---|
public boolean isEnabled()
isEnabled
in interface ParticleFunction
public void setEnabled(boolean state)
setEnabled
in interface ParticleFunction
state
- The new enabled state to set it topublic boolean newFrame(int deltaT)
newFrame
in interface ParticleFunction
deltaT
- The elapsed time in milliseconds since the last frame
public boolean apply(Particle particle)
apply
in interface ParticleFunction
particle
- The particle to apply the function to
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |