#include <XFuParticleSystem.h>
Collaboration diagram for XFuParticleSystem:
Public Member Functions | |
XFuParticleSystem () | |
Constructor. | |
virtual | ~XFuParticleSystem () |
Destructor. | |
void | restart () |
Restarts the particle system. | |
void | tick (XFcFixed aTime) |
Called to update the particle system. | |
void | tickOnce (XFcFixed aTimeSlice) |
Used internally. | |
void | render (XFcGL *mGL) |
Renders the particle system using 3D sprites. | |
void | setMaxVisible (INT32 value) |
Sets maximum number of visible particles. | |
void | save (const CHAR *aFname) |
Saves particle system to disk. | |
void | load (const CHAR *aFname) |
Loads particle system from disk. | |
void | loadTextures (const CHAR *aFilenamePrefix=NULL) |
Loads textures. | |
void | newParticle (struct Particle &aParticle) |
Creates a new particle. | |
void | PSSeed (INT32 aValue) |
Seeds the noise function. | |
INT32 | PSRand () |
Noise function. | |
Static Public Member Functions | |
INT32 | PSRandInPlace (INT32 aSeed) |
Seeds the noise function and returns the next value. | |
Public Attributes | |
UINT32 | mFlags |
Flags (see XFUPARTICLESYSTEM_FLAGBITS enum). | |
XFcFixed | mLaunchVelocity [3] |
Launch velocity. | |
XFuNoiseController | mLaunchVelocityVar [3] |
Noise controllers for launch velocity. | |
XFcFixed | mDamping [3] |
Damping (emulates friction). | |
XFcFixed | mWeight [3] |
Weight (or gravity, wind, whatever). | |
XFuNoiseController | mNoise [3] |
Noise contollers for weight. | |
XFcFixed | mLaunchRate |
Launch rate (particles per second). | |
INT32 | mMaxAge |
Maximum age (in msec). | |
XFuNoiseController | mAgeVariation |
Maximum age noise controller. | |
INT32 | mMaxTotal |
Maximum number of particles for all time. | |
INT32 | mMaxVisible |
Maximum number of particles visible at any time. DO NOT CHANGE DIRECTLY. | |
XFcFixed | mSizeScale |
All sizes are scaled by this value. | |
XFcFixed | mViewScale |
Scaling value for the rendering billboards. | |
XFcFixed | mTimeScale |
Time is scaled by this value (for 'bullet-time'ish things) - unfinished. | |
XFcFixed | mDesiredFPS |
Maximum iterations per second. | |
INT32 | mAlphaMode |
Alpha mode (none, alpha, add, mul, invmul). | |
XFcFixed | mAlphaStart |
Alpha value at the beginning of the lifespan. | |
XFcFixed | mAlphaEnd |
Alpha value at the end of the lifespan. | |
XFuNoiseController | mAlphaVariation |
Noise controller for alpha. | |
XFcFixed | mParticleSizeStart |
Particle size at the beginning of the lifespan. | |
XFcFixed | mParticleSizeEnd |
Particle size at the end of the lifespan. | |
XFuNoiseController | mParticleSizeVariation |
Noise controller for particle size. | |
XFcFixed | mRotation |
Base z-rotation. | |
XFuNoiseController | mRotationVariation |
Noise controller for rotation. | |
XFuNoiseController | mRotationNoise |
Noise controller for original z-position. | |
XFuNoiseController | mFrameVariation |
Noise controller for particle animation frames. | |
XFcFixed | mEmitterSize [3] |
Emitter size (0 for point). | |
XFcFixed | mAABB [3] |
Maximum limits from the center of the particle system (0 for infinite). | |
INT32 | mPreTick |
How many frames to pre-tick the particle system on restart. | |
CHAR ** | mTexture |
File names for animation frames. | |
XFuParticleSystem::Particle * | mParticle |
Array of particles. | |
INT32 | mActive |
Number of currently active particles. | |
INT32 | mFrames |
Number of frames of animation for this system. | |
XFcGLTexture ** | mFrame |
Particle animation frames. | |
XFcFixed | mStartTick |
Start tick. | |
XFcFixed | mLastTick |
Last tick the particle system was updated. | |
XFcFixed | mCurrentTick |
Current tick . | |
INT32 | mPeakActive |
Peak active particles. | |
INT32 | mEmitted |
Number of particles emitted so far. | |
XFcFixed | mEmitQueue |
Number of particles in queue to be emitted. | |
INT32 | mRandSeed1 |
First seed for rol'n'xor noise function. | |
INT32 | mRandSeed2 |
Second seed for rol'n'xor noise function. |
This particle system class runs and renders particle systems made with the 'thingamajig' particle system editor.
Definition at line 60 of file XFuParticleSystem.h.
|
Constructor.
Definition at line 66 of file XFuParticleSystem.cpp. References mCurrentTick, mFrame, mFrames, mParticle, mTexture, mViewScale, and PSSeed(). |
|
Destructor.
Definition at line 104 of file XFuParticleSystem.cpp. |
|
Loads particle system from disk.
|
|
Loads textures.
Definition at line 639 of file XFuParticleSystem.cpp. |
|
|
Noise function.
Definition at line 38 of file XFuParticleSystem.cpp. References mRandSeed1, and mRandSeed2. Referenced by newParticle(), and XFuNoiseController::noise(). |
|
Seeds the noise function and returns the next value.
Definition at line 49 of file XFuParticleSystem.cpp. Referenced by XFuNoiseController::noise(). |
|
Seeds the noise function.
Definition at line 26 of file XFuParticleSystem.cpp. References mRandSeed1, and mRandSeed2. Referenced by XFuParticleSystem(). |
|
Renders the particle system using 3D sprites.
Definition at line 176 of file XFuParticleSystem.cpp. References XFuParticleSystem::Particle::mAge, mAlphaEnd, mAlphaStart, mAlphaVariation, mFrames, mFrameVariation, mMaxVisible, mParticle, mParticleSizeEnd, mParticleSizeStart, mParticleSizeVariation, mSizeScale, mViewScale, and XFuNoiseController::noise(). |
|
Restarts the particle system.
Definition at line 78 of file XFuParticleSystem.cpp. References mActive, XFuParticleSystem::Particle::mAge, mEmitQueue, mEmitted, mLastTick, mMaxVisible, mParticle, mPeakActive, mPreTick, mStartTick, and tickOnce(). Referenced by setMaxVisible(). |
|
Saves particle system to disk.
Definition at line 456 of file XFuParticleSystem.cpp. References mAgeVariation, mAlphaVariation, mFrames, mFrameVariation, mLaunchVelocityVar, mNoise, mParticleSizeVariation, mRotationNoise, mRotationVariation, mTexture, PS_VERSIONTAG, and XFuNoiseController::write(). |
|
Sets maximum number of visible particles.
Definition at line 94 of file XFuParticleSystem.cpp. References mMaxVisible, mParticle, and restart(). |
|
Called to update the particle system.
Definition at line 398 of file XFuParticleSystem.cpp. References mDesiredFPS, mFlags, mLastTick, mTimeScale, tickOnce(), and XFUPSF_FORCEITERATIONS. |
|
|
Maximum limits from the center of the particle system (0 for infinite).
Definition at line 129 of file XFuParticleSystem.h. Referenced by tickOnce(). |
|
Number of currently active particles.
Definition at line 154 of file XFuParticleSystem.h. Referenced by restart(), and tickOnce(). |
|
Maximum age noise controller.
Definition at line 84 of file XFuParticleSystem.h. Referenced by newParticle(), and save(). |
|
Alpha value at the end of the lifespan.
Definition at line 106 of file XFuParticleSystem.h. Referenced by render(). |
|
Alpha mode (none, alpha, add, mul, invmul).
Definition at line 102 of file XFuParticleSystem.h. |
|
Alpha value at the beginning of the lifespan.
Definition at line 104 of file XFuParticleSystem.h. Referenced by render(). |
|
Noise controller for alpha.
Definition at line 108 of file XFuParticleSystem.h. |
|
Current tick .
Definition at line 159 of file XFuParticleSystem.h. Referenced by tickOnce(), and XFuParticleSystem(). |
|
Damping (emulates friction).
Definition at line 72 of file XFuParticleSystem.h. Referenced by tickOnce(). |
|
Maximum iterations per second.
Definition at line 99 of file XFuParticleSystem.h. Referenced by tick(). |
|
Number of particles in queue to be emitted.
Definition at line 162 of file XFuParticleSystem.h. Referenced by restart(), and tickOnce(). |
|
Number of particles emitted so far.
Definition at line 161 of file XFuParticleSystem.h. Referenced by restart(), and tickOnce(). |
|
Emitter size (0 for point).
Definition at line 127 of file XFuParticleSystem.h. Referenced by newParticle(). |
|
Flags (see XFUPARTICLESYSTEM_FLAGBITS enum).
Definition at line 64 of file XFuParticleSystem.h. Referenced by tick(), and tickOnce(). |
|
Particle animation frames.
Definition at line 156 of file XFuParticleSystem.h. Referenced by loadTextures(), XFuParticleSystem(), and ~XFuParticleSystem(). |
|
Number of frames of animation for this system.
Definition at line 155 of file XFuParticleSystem.h. Referenced by loadTextures(), render(), save(), XFuParticleSystem(), and ~XFuParticleSystem(). |
|
Noise controller for particle animation frames.
Definition at line 124 of file XFuParticleSystem.h. |
|
Last tick the particle system was updated.
Definition at line 158 of file XFuParticleSystem.h. |
|
Launch rate (particles per second).
Definition at line 80 of file XFuParticleSystem.h. |
|
Launch velocity.
Definition at line 67 of file XFuParticleSystem.h. Referenced by newParticle(). |
|
Noise controllers for launch velocity.
Definition at line 69 of file XFuParticleSystem.h. Referenced by newParticle(), and save(). |
|
Maximum age (in msec).
Definition at line 82 of file XFuParticleSystem.h. Referenced by newParticle(). |
|
Maximum number of particles for all time.
Definition at line 86 of file XFuParticleSystem.h. Referenced by tickOnce(). |
|
Maximum number of particles visible at any time. DO NOT CHANGE DIRECTLY.
Definition at line 88 of file XFuParticleSystem.h. Referenced by render(), restart(), setMaxVisible(), and tickOnce(). |
|
Noise contollers for weight.
Definition at line 77 of file XFuParticleSystem.h. Referenced by save(), and tickOnce(). |
|
Array of particles.
Referenced by render(), restart(), setMaxVisible(), tickOnce(), XFuParticleSystem(), and ~XFuParticleSystem(). |
|
Particle size at the end of the lifespan.
Definition at line 113 of file XFuParticleSystem.h. Referenced by render(). |
|
Particle size at the beginning of the lifespan.
Definition at line 111 of file XFuParticleSystem.h. Referenced by render(). |
|
Noise controller for particle size.
Definition at line 115 of file XFuParticleSystem.h. |
|
Peak active particles.
Definition at line 160 of file XFuParticleSystem.h. Referenced by restart(), and tickOnce(). |
|
How many frames to pre-tick the particle system on restart.
Definition at line 132 of file XFuParticleSystem.h. Referenced by restart(). |
|
First seed for rol'n'xor noise function.
Definition at line 164 of file XFuParticleSystem.h. |
|
Second seed for rol'n'xor noise function.
Definition at line 165 of file XFuParticleSystem.h. |
|
Base z-rotation.
Definition at line 117 of file XFuParticleSystem.h. Referenced by newParticle(). |
|
Noise controller for original z-position.
Definition at line 121 of file XFuParticleSystem.h. Referenced by newParticle(), and save(). |
|
Noise controller for rotation.
Definition at line 119 of file XFuParticleSystem.h. Referenced by save(), and tickOnce(). |
|
All sizes are scaled by this value.
Definition at line 91 of file XFuParticleSystem.h. Referenced by render(). |
|
Start tick.
Definition at line 157 of file XFuParticleSystem.h. Referenced by restart(). |
|
File names for animation frames.
Definition at line 135 of file XFuParticleSystem.h. Referenced by save(), XFuParticleSystem(), and ~XFuParticleSystem(). |
|
Time is scaled by this value (for 'bullet-time'ish things) - unfinished.
Definition at line 97 of file XFuParticleSystem.h. Referenced by tick(). |
|
Scaling value for the rendering billboards. This is inverse of the camera scale in ViewMatrix. Definition at line 95 of file XFuParticleSystem.h. Referenced by render(), and XFuParticleSystem(). |
|
Weight (or gravity, wind, whatever).
Definition at line 75 of file XFuParticleSystem.h. Referenced by tickOnce(). |
![]() | ||||
![]() |
Confidential Copyright © 2002-2003 Fathammer | with doxygen by Dimitri van Heesch |