|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.effects.Particle
Particle defines a single Particle of a Particle system.
Generally, you would not interact with this class directly.
| Field Summary | |
static int |
ALIVE
Particle is currently active. |
static int |
AVAILABLE
Particle is available for spawning. |
static int |
DEAD
Particle is dead -- not in play. |
| Constructor Summary | |
Particle(ParticleManager parent,
Vector3f speed,
Vector3f iLocation,
float lifeSpan)
Particle constructor |
|
| Method Summary | |
Vector3f |
getPosition()
|
int |
getStatus()
|
void |
recreateParticle(Vector3f speed,
float lifeSpan)
Reset particle conditions. |
void |
resetAge()
Resets current age to 0 |
boolean |
updateAndCheck(float secondsPassed)
update position (using current location, speed and gravity), color (interpolating between start and end color), size (interpolating between start and end size) and current age of particle. |
void |
updateVerts()
Update the vertices for this particle, taking size, direction of viewer and current location into account. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEAD
public static final int ALIVE
public static final int AVAILABLE
| Constructor Detail |
public Particle(ParticleManager parent,
Vector3f speed,
Vector3f iLocation,
float lifeSpan)
parent - ParticleManager parent of this particlespeed - initial velocity of the particle in the x,y and z directionsiLocation - initial location of the particlelifeSpan - how long the particle should live for| Method Detail |
public void recreateParticle(Vector3f speed,
float lifeSpan)
speed - initial velocity of recreated particlelifeSpan - the recreated particle's new lifespanpublic void updateVerts()
public boolean updateAndCheck(float secondsPassed)
updateVerts() is called.
if this particle's age is greater than its lifespan, it is considered dead.
secondsPassed - number of seconds passed since last update.
public void resetAge()
public Vector3f getPosition()
public int getStatus()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||