#include <ParticleSys.h>
Inherits MemoryPoolObject, and ParticleInfo.
Public Member Functions | |
| Particle (ParticleSystem *system, const ParticleInfo *data) | |
| Bool | update (void) |
| update this particle's behavior - return false if dead | |
| void | doWindMotion (void) |
| do wind motion (if present) from particle system | |
| void | applyForce (const Coord3D *force) |
| add the given acceleration | |
| const Coord3D * | getPosition (void) |
| Real | getSize (void) |
| Real | getAngle (void) |
| Real | getAlpha (void) |
| const RGBColor * | getColor (void) |
| void | setColor (RGBColor *color) |
| Bool | isInvisible (void) |
| return true if this particle is invisible | |
| Bool | isCulled (void) |
| return true if the particle falls off the edge of the screen | |
| void | setIsCulled (Bool enable) |
| set particle to not visible because it's outside view frustum | |
| void | controlParticleSystem (ParticleSystem *sys) |
| void | detachControlledParticleSystem (void) |
| ParticlePriorityType | getPriority (void) |
| UnsignedInt | getPersonality (void) |
| void | setPersonality (UnsignedInt p) |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Public Member Functions inherited from ParticleInfo | |
| ParticleInfo (void) | |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Public Attributes | ||
| Particle * | m_systemNext | |
| Particle * | m_systemPrev | |
| Particle * | m_overallNext | |
| Particle * | m_overallPrev | |
| Bool | m_inSystemList | |
| Bool | m_inOverallList | |
| union { | ||
| ParticleSystem * m_systemUnderControl | ||
| the particle system attached to this particle (not the system that created us) More... | ||
| ParticleSystemID m_systemUnderControlID | ||
| id of system attached to this particle (not the system that created us); More... | ||
| }; | ||
Public Attributes inherited from ParticleInfo | ||
| Coord3D | m_vel | |
| initial velocity | ||
| Coord3D | m_pos | |
| initial position | ||
| Coord3D | m_emitterPos | |
| position of the emitter | ||
| Real | m_velDamping | |
| velocity damping coefficient | ||
| Real | m_angleZ | |
| initial angle around Z axis | ||
| Real | m_angularRateZ | |
| initial angle around Z axis | ||
| Real | m_angularDamping | |
| angular velocity damping coefficient | ||
| UnsignedInt | m_lifetime | |
| lifetime of this particle | ||
| Real | m_size | |
| size of the particle | ||
| Real | m_sizeRate | |
| rate of change of size | ||
| Real | m_sizeRateDamping | |
| damping of size change rate | ||
| Keyframe | m_alphaKey [MAX_KEYFRAMES] | |
| RGBColorKeyframe | m_colorKey [MAX_KEYFRAMES] | |
| Real | m_colorScale | |
| color "scaling" coefficient | ||
| Real | m_windRandomness | |
| multiplier for wind randomness per particle | ||
| Bool | m_particleUpTowardsEmitter | |
| correspond to the direction of the emitter. | ||
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
| void | computeAlphaRate (void) |
| compute alpha rate to get to next key | |
| void | computeColorRate (void) |
| compute color change to get to next key | |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Protected Attributes | |
| ParticleSystem * | m_system |
| the particle system this particle belongs to | |
| UnsignedInt | m_personality |
| each new particle assigned a number one higher than the previous | |
| Coord3D | m_accel |
| current acceleration | |
| Coord3D | m_lastPos |
| previous position | |
| UnsignedInt | m_lifetimeLeft |
| lifetime remaining, if zero -> destroy | |
| UnsignedInt | m_createTimestamp |
| frame this particle was created | |
| Real | m_alpha |
| current alpha of this particle | |
| Real | m_alphaRate |
| current rate of alpha change | |
| Int | m_alphaTargetKey |
| next index into key array | |
| RGBColor | m_color |
| current color of this particle | |
| RGBColor | m_colorRate |
| current rate of color change | |
| Int | m_colorTargetKey |
| next index into key array | |
| Bool | m_isCulled |
| status of particle relative to screen bounds | |
An individual particle created by a ParticleSystem. NOTE: Particles cannot exist without a parent particle system.
Definition at line 163 of file ParticleSys.h.
| Particle::Particle | ( | ParticleSystem * | system, |
| const ParticleInfo * | info ) |
Construct a particle from a particle template
Definition at line 256 of file ParticleSys.cpp.
| void Particle::applyForce | ( | const Coord3D * | force | ) |
add the given acceleration
Add the given acceleration
Definition at line 348 of file ParticleSys.cpp.
|
protected |
compute alpha rate to get to next key
Compute alpha rate to get to next key on given frame
Definition at line 215 of file ParticleSys.cpp.
|
protected |
compute color change to get to next key
Compute color rate to get to next key on given frame
Definition at line 232 of file ParticleSys.cpp.
|
inline |
Definition at line 189 of file ParticleSys.h.
|
protectedvirtual |
|
inline |
Definition at line 190 of file ParticleSys.h.
| void Particle::doWindMotion | ( | void | ) |
do wind motion (if present) from particle system
Do wind motion as specified by the particle system template, if present
Definition at line 491 of file ParticleSys.cpp.
|
inline |
Definition at line 181 of file ParticleSys.h.
|
inline |
Definition at line 180 of file ParticleSys.h.
|
inline |
Definition at line 182 of file ParticleSys.h.
|
inline |
Definition at line 195 of file ParticleSys.h.
|
inline |
Definition at line 178 of file ParticleSys.h.
| ParticlePriorityType Particle::getPriority | ( | void | ) |
Get priority of a particle ... which is the priority of it's attached system
Definition at line 573 of file ParticleSys.cpp.
|
inline |
Definition at line 179 of file ParticleSys.h.
|
inline |
return true if the particle falls off the edge of the screen
Definition at line 186 of file ParticleSys.h.
|
inline |
return true if this particle is invisible
Return true if this particle is invisible
Definition at line 581 of file ParticleSys.cpp.
|
protectedvirtual |
|
inline |
Definition at line 183 of file ParticleSys.h.
|
inline |
set particle to not visible because it's outside view frustum
Definition at line 187 of file ParticleSys.h.
|
inline |
Definition at line 196 of file ParticleSys.h.
|
inline |
update this particle's behavior - return false if dead
Update the behavior of an individual particle
Definition at line 358 of file ParticleSys.cpp.
|
protectedvirtual |
Xfer method Version Info: 1: Initial version
Reimplemented from ParticleInfo.
Definition at line 635 of file ParticleSys.cpp.
| union { ... } Particle |
|
protected |
current acceleration
Definition at line 220 of file ParticleSys.h.
|
protected |
current alpha of this particle
Definition at line 225 of file ParticleSys.h.
|
protected |
current rate of alpha change
Definition at line 226 of file ParticleSys.h.
|
protected |
next index into key array
Definition at line 227 of file ParticleSys.h.
|
protected |
current color of this particle
Definition at line 229 of file ParticleSys.h.
|
protected |
current rate of color change
Definition at line 230 of file ParticleSys.h.
|
protected |
next index into key array
Definition at line 231 of file ParticleSys.h.
|
protected |
frame this particle was created
Definition at line 223 of file ParticleSys.h.
| Bool Particle::m_inOverallList |
Definition at line 237 of file ParticleSys.h.
| Bool Particle::m_inSystemList |
Definition at line 236 of file ParticleSys.h.
|
protected |
status of particle relative to screen bounds
Definition at line 234 of file ParticleSys.h.
|
protected |
previous position
Definition at line 221 of file ParticleSys.h.
|
protected |
lifetime remaining, if zero -> destroy
Definition at line 222 of file ParticleSys.h.
| Particle* Particle::m_overallNext |
Definition at line 211 of file ParticleSys.h.
| Particle* Particle::m_overallPrev |
Definition at line 212 of file ParticleSys.h.
|
protected |
each new particle assigned a number one higher than the previous
Definition at line 216 of file ParticleSys.h.
|
protected |
the particle system this particle belongs to
Definition at line 215 of file ParticleSys.h.
| Particle* Particle::m_systemNext |
Definition at line 209 of file ParticleSys.h.
| Particle* Particle::m_systemPrev |
Definition at line 210 of file ParticleSys.h.
| ParticleSystem* Particle::m_systemUnderControl |
the particle system attached to this particle (not the system that created us)
Definition at line 241 of file ParticleSys.h.
| ParticleSystemID Particle::m_systemUnderControlID |
id of system attached to this particle (not the system that created us);
Definition at line 242 of file ParticleSys.h.