Public Types | |
enum | Shape { POINT, QUAD, QUAD_TRIANGLESTRIP, HEXAGON, LINE } |
Public Member Functions | |
Particle () | |
Shape | getShape () const |
Get the shape of the particle. | |
void | setShape (Shape s) |
Set the shape of the particle. | |
bool | isAlive () const |
Get whether the particle is still alive. | |
double | getLifeTime () const |
Get the life time of the particle (in seconds). | |
double | getAge () const |
Get the age of the particle (in seconds). | |
const rangef & | getSizeRange () const |
Get the minimum and maximum values for polygon size. | |
const rangef & | getAlphaRange () const |
Get the minimum and maximum values for alpha. | |
const rangev4 & | getColorRange () const |
Get the minimum and maximum values for color. | |
const Interpolator * | getSizeInterpolator () const |
Get the interpolator for computing the size of polygons. | |
const Interpolator * | getAlphaInterpolator () const |
Get the interpolator for computing alpha values. | |
const Interpolator * | getColorInterpolator () const |
Get the interpolator for computing color values. | |
float | getRadius () const |
float | getMass () const |
float | getMassInv () const |
Get 1 / getMass() . | |
const osg::Vec3 & | getPosition () const |
Get the position vector. | |
const osg::Vec3 & | getVelocity () const |
const osg::Vec3 & | getPreviousPosition () const |
Get the previous position (the position before last update). | |
const osg::Vec3 & | getAngle () const |
Get the angle vector. | |
const osg::Vec3 & | getAngularVelocity () const |
Get the rotational velocity vector. | |
const osg::Vec3 & | getPreviousAngle () const |
Get the previous angle vector. | |
void | kill () |
void | setLifeTime (double t) |
Set the life time of the particle. | |
void | setSizeRange (const rangef &r) |
Set the minimum and maximum values for polygon size. | |
void | setAlphaRange (const rangef &r) |
Set the minimum and maximum values for alpha. | |
void | setColorRange (const rangev4 &r) |
Set the minimum and maximum values for color. | |
void | setSizeInterpolator (Interpolator *ri) |
Set the interpolator for computing size values. | |
void | setAlphaInterpolator (Interpolator *ai) |
Set the interpolator for computing alpha values. | |
void | setColorInterpolator (Interpolator *ci) |
Set the interpolator for computing color values. | |
void | setRadius (float r) |
void | setMass (float m) |
void | setPosition (const osg::Vec3 &p) |
Set the position vector. | |
void | setVelocity (const osg::Vec3 &v) |
void | addVelocity (const osg::Vec3 &dv) |
Add a vector to the velocity vector. | |
void | transformPositionVelocity (const osg::Matrix &xform) |
Transform position and velocity vectors by a matrix. | |
void | setAngle (const osg::Vec3 &a) |
Set the angle vector. | |
void | setAngularVelocity (const osg::Vec3 &v) |
void | addAngularVelocity (const osg::Vec3 &dv) |
Add a vector to the angular velocity vector. | |
void | transformAngleVelocity (const osg::Matrix &xform) |
Transform angle and angularVelocity vectors by a matrix. | |
bool | update (double dt) |
void | beginRender () const |
Perform some pre-rendering tasks. Called automatically by particle systems. | |
void | render (const osg::Vec3 &xpos, const osg::Vec3 &px, const osg::Vec3 &py, float scale=1.0f) const |
Render the particle. Called automatically by particle systems. | |
void | endRender () const |
Perform some post-rendering tasks. Called automatically by particle systems. | |
float | getCurrentSize () const |
Get the current (interpolated) polygon size. Valid only after the first call to update(). | |
void | setTextureTile (int sTile, int tTile, int numTiles=0) |
|
Shape of particles. NOTE: the LINE shape should be used in conjunction with FIXED alignment mode (see ParticleSystem). |
|
|
|
Add a vector to the angular velocity vector.
|
|
Add a vector to the velocity vector.
|
|
Perform some pre-rendering tasks. Called automatically by particle systems.
|
|
Perform some post-rendering tasks. Called automatically by particle systems.
|
|
Get the age of the particle (in seconds).
|
|
Get the interpolator for computing alpha values.
|
|
Get the minimum and maximum values for alpha.
|
|
Get the angle vector.
|
|
Get the rotational velocity vector.
|
|
Get the interpolator for computing color values.
|
|
Get the minimum and maximum values for color.
|
|
Get the current (interpolated) polygon size. Valid only after the first call to update().
|
|
Get the life time of the particle (in seconds).
|
|
Get the mass of the particle. For built-in operators to work correctly, remember that the mass is expressed in kg. |
|
Get
|
|
Get the position vector.
|
|
Get the previous angle vector.
|
|
Get the previous position (the position before last update).
|
|
Get the physical radius of the particle. For built-in operators to work correctly, lengths must be expressed in meters. |
|
Get the shape of the particle.
|
|
Get the interpolator for computing the size of polygons.
|
|
Get the minimum and maximum values for polygon size.
|
|
Get the velocity vector. For built-in operators to work correctly, remember that velocity components are expressed in meters per second. |
|
Get whether the particle is still alive.
|
|
Kill the particle on next update NOTE: after calling this function, the |
|
Render the particle. Called automatically by particle systems.
|
|
Set the interpolator for computing alpha values.
|
|
Set the minimum and maximum values for alpha.
|
|
Set the angle vector.
|
|
Set the angular velocity vector. Components x, y and z are angles of rotation around the respective axis (in radians). |
|
Set the interpolator for computing color values.
|
|
Set the minimum and maximum values for color.
|
|
Set the life time of the particle.
|
|
Set the mass of the particle. For built-in operators to work correctly, remember that the mass is expressed in kg. |
|
Set the position vector.
|
|
Set the physical radius of the particle. For built-in operators to work correctly, lengths must be expressed in meters. |
|
Set the shape of the particle.
|
|
Set the interpolator for computing size values.
|
|
Set the minimum and maximum values for polygon size.
|
|
|
|
Set the velocity vector. For built-in operators to work correctly, remember that velocity components are expressed in meters per second. |
|
Transform angle and angularVelocity vectors by a matrix.
|
|
Transform position and velocity vectors by a matrix.
|
|
Update the particle (don't call this method manually). This method is called automatically by |