|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.geom.particle.GravityParticleFunction
public class GravityParticleFunction
GravityMovementFunction applied a gravity force to Particles.
| Constructor Summary | |
|---|---|
GravityParticleFunction()
Construct the function with gravity acting in the traditional newtonian way - down the -Y axis at 9.8m/s^2. |
|
GravityParticleFunction(float x,
float y,
float z)
Create a new function with gravity set to the given vector and value. |
|
| Method Summary | |
|---|---|
boolean |
apply(Particle particle)
Apply this function to the given particle right now. |
void |
getGravity(float[] val)
Get the current value of gravity. |
boolean |
isEnabled()
Check to see if this function has been enabled or not currently. |
boolean |
newFrame(int deltaT)
Notification that the system is about to do an update of the particles and to do any system-level initialisation. |
void |
setEnabled(boolean state)
Set the enabled state of this function. |
void |
setGravity(float[] gravity)
Change the gravity to a new value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GravityParticleFunction()
public GravityParticleFunction(float x,
float y,
float z)
x - The gravity vector to apply along the x axisy - The gravity vector to apply along the y axisz - The gravity vector to apply along the z axis| Method Detail |
|---|
public boolean isEnabled()
isEnabled in interface ParticleFunctionpublic void setEnabled(boolean state)
setEnabled in interface ParticleFunctionstate - The new enabled state to set it topublic boolean newFrame(int deltaT)
newFrame in interface ParticleFunctiondeltaT - The elapsed time in milliseconds since the last frame
public boolean apply(Particle particle)
apply in interface ParticleFunctionparticle - The particle to apply the function to
public void setGravity(float[] gravity)
gravity - The vector and magnitude of the new gravitypublic void getGravity(float[] val)
val - An array of length 3 to copy the values to
|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||