|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.effect.Particle
public final class Particle
Contains the state of a single particle.
| Field Summary | |
|---|---|
protected float |
_age
The particle's proportional age (0 to 1). |
protected AlphaMode |
_alphaMode
The particle's alpha mode. |
protected Vector3f |
_angularVelocity
The particle's angular velocity. |
protected Color4f |
_color
The particle's current color. |
protected ColorFunction |
_colorfunc
The particle's color as a function of its proportional age. |
protected float |
_frame
The particle's current texture frame. |
protected FloatFunction |
_framefunc
The particle's texture frame as a function of its proportional age. |
protected PositionHistory |
_history
The particle's position history. |
protected float |
_length
The particle's current length. |
protected FloatFunction |
_lengthfunc
The particle's length as a function of its proportional age. |
protected float |
_lifescale
The reciprocal of the particle's lifespan. |
protected Quaternion |
_orientation
The particle's orientation. |
protected Vector3f |
_position
The particle's position. |
protected float |
_size
The particle's current size. |
protected FloatFunction |
_sizefunc
The particle's size as a function of its proportional age. |
protected Vector3f |
_velocity
The particle's (linear) velocity. |
float |
depth
The depth of the particle (used for depth sorting). |
| Constructor Summary | |
|---|---|
Particle()
|
|
| Method Summary | |
|---|---|
Vector3f |
getAngularVelocity()
Returns a reference to the particle's angular velocity. |
Color4f |
getColor()
Returns a reference to the particle's color. |
float |
getFrame()
Returns the particle's texture frame. |
Quaternion |
getOrientation()
Returns a reference to the particle's orientation. |
Vector3f |
getPosition()
Returns a reference to the particle's position. |
Vector3f |
getPosition(float t,
Vector3f result)
Computes the particle's position at some point in its past (where 0 is the oldest position and 1 is the newest). |
float |
getSize()
Returns the particle's size. |
float |
getSize(float t)
Computes the particle's size at some point in its past. |
Vector3f |
getVelocity()
Returns a reference to the particle's (linear) velocity. |
void |
init(float lifespan,
AlphaMode alphaMode,
ColorFunctionVariable color,
FloatFunctionVariable size,
FloatFunctionVariable length,
FloatFunctionVariable frame,
Transform3D historyTransform)
Initializes the particle. |
void |
setSize(float size)
Sets the particle's size. |
boolean |
tick(float elapsed)
Updates the particle state based on the elapsed time in seconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float depth
protected float _age
protected float _lifescale
protected Vector3f _position
protected PositionHistory _history
protected Vector3f _velocity
protected Quaternion _orientation
protected Vector3f _angularVelocity
protected AlphaMode _alphaMode
protected ColorFunction _colorfunc
protected Color4f _color
protected FloatFunction _sizefunc
protected float _size
protected FloatFunction _lengthfunc
protected float _length
protected FloatFunction _framefunc
protected float _frame
| Constructor Detail |
|---|
public Particle()
| Method Detail |
|---|
public Vector3f getPosition()
public Vector3f getPosition(float t,
Vector3f result)
public float getSize(float t)
public Vector3f getVelocity()
public Quaternion getOrientation()
public Vector3f getAngularVelocity()
public Color4f getColor()
public void setSize(float size)
public float getSize()
public float getFrame()
public void init(float lifespan,
AlphaMode alphaMode,
ColorFunctionVariable color,
FloatFunctionVariable size,
FloatFunctionVariable length,
FloatFunctionVariable frame,
Transform3D historyTransform)
public boolean tick(float elapsed)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||