Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
ParticleSystem Class Reference

#include <ParticleSys.h>

Inherits MemoryPoolObject, and ParticleSystemInfo.

Public Member Functions

 ParticleSystem (const ParticleSystemTemplate *sysTemplate, ParticleSystemID id, Bool createSlaves)
 create a particle system from a template and assign it this ID
 
ParticleSystemID getSystemID (void) const
 get unique system ID
 
void setPosition (const Coord3D *pos)
 set the position of the particle system
 
void getPosition (Coord3D *pos)
 get the position of the particle system
 
void setLocalTransform (const Matrix3D *matrix)
 set the system's local transform
 
void rotateLocalTransformX (Real x)
 rotate local transform matrix
 
void rotateLocalTransformY (Real y)
 rotate local transform matrix
 
void rotateLocalTransformZ (Real z)
 rotate local transform matrix
 
void setSkipParentXfrm (Bool enable)
 disable transforming particle system with parent matrix.
 
const Coord3DgetDriftVelocity (void)
 get the drift velocity of the system
 
void attachToDrawable (const Drawable *draw)
 attach this particle system to a Drawable
 
void attachToObject (const Object *obj)
 attach this particle system to an Object
 
virtual Bool update (Int localPlayerIndex)
 update this particle system, return false if dead
 
void updateWindMotion (void)
 update wind motion
 
void setControlParticle (Particle *p)
 set control particle
 
void start (void)
 (re)start a stopped particle system
 
void stop (void)
 stop a particle system from emitting
 
void destroy (void)
 stop emitting, and wait for particles to die, then destroy self
 
void setVelocityMultiplier (const Coord3D *value)
 set the velocity multiplier coefficient
 
const Coord3DgetVelocityMultiplier (void)
 get the velocity multiplier coefficient
 
void setBurstCountMultiplier (Real value)
 
Real getBurstCountMultiplier (void)
 
void setBurstDelayMultiplier (Real value)
 
Real getBurstDelayMultiplier (void)
 
void setSizeMultiplier (Real value)
 
Real getSizeMultiplier (void)
 
void trigger (void)
 Force a burst of particles to be emitted immediately.
 
void setInitialDelay (UnsignedInt delay)
 
AsciiString getParticleTypeName (void)
 return the name of the particles
 
Bool isUsingDrawables (void)
 
Bool isUsingStreak (void)
 
Bool isUsingSmudge (void)
 
UnsignedInt getVolumeParticleDepth (void)
 
Bool shouldBillboard (void)
 
ParticleShaderType getShaderType (void)
 
void setSlave (ParticleSystem *slave)
 set a slave system for us
 
ParticleSystemgetSlave (void)
 
void setMaster (ParticleSystem *master)
 make this a slave with a master
 
ParticleSystemgetMaster (void)
 
const Coord3DgetSlavePositionOffset (void)
 
void setSystemLifetime (UnsignedInt frames)
 
void setLifetimeRange (Real min, Real max)
 not the particle life, the system!... Lorenzen
 
Bool isSystemForever () const
 
UnsignedInt getStartFrame (void)
 return frame when this system was created
 
Bool isDestroyed (void) const
 
void setSaveable (Bool b)
 
Bool isSaveable (void) const
 
void detachControlParticle (Particle *p)
 called when the particle this system is controlled by dies
 
const ParticleSystemTemplategetTemplate (void)
 get the template used to create this system
 
ParticlegetFirstParticle (void)
 
void addParticle (Particle *particleToAdd)
 
void removeParticle (Particle *p)
 when a particle dies, it calls this method - ONLY FOR USE BY PARTICLE
 
UnsignedInt getParticleCount (void) const
 
ObjectID getAttachedObject (void)
 
DrawableID getAttachedDrawable (void)
 
void setEmissionVolumeSphereRadius (Real newRadius)
 
void setEmissionVolumeCylinderRadius (Real newRadius)
 
EmissionVolumeType getEmisionVolumeType () const
 
ParticlePriorityType getPriority () const
 
Real getWindAngle (void)
 
WindMotion getWindMotion (void)
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from ParticleSystemInfo
 ParticleSystemInfo ()
 to set defaults.
 
void tintAllColors (Color tintColor)
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Static Public Member Functions

static ParticleInfo mergeRelatedParticleSystems (ParticleSystem *masterParticleSystem, ParticleSystem *slaveParticleSystem, Bool slaveNeedsFullPromotion)
 

Protected Member Functions

virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
virtual ParticlecreateParticle (const ParticleInfo *data, ParticlePriorityType priority, Bool forceCreate=FALSE)
 factory method for particles
 
const ParticleInfogenerateParticleInfo (Int particleNum, Int particleCount)
 generate a new, random set of ParticleInfo
 
const Coord3DcomputeParticlePosition (void)
 compute a position based on emission properties
 
const Coord3DcomputeParticleVelocity (const Coord3D *pos)
 compute a velocity vector based on emission properties
 
const Coord3DcomputePointOnUnitSphere (void)
 compute a random point on a unit sphere
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Protected Attributes

Particlem_systemParticlesHead
 
Particlem_systemParticlesTail
 
UnsignedInt m_particleCount
 current count of particles for this system
 
ParticleSystemID m_systemID
 unique id given to this system from the particle system manager
 
DrawableID m_attachedToDrawableID
 if non-zero, system is parented to this Drawable
 
ObjectID m_attachedToObjectID
 if non-zero, system is parented to this Object
 
Matrix3D m_localTransform
 local orientation & position of system
 
Matrix3D m_transform
 composite transform of parent Drawable and local
 
UnsignedInt m_burstDelayLeft
 when zero, emit a particle burst
 
UnsignedInt m_delayLeft
 decremented until zero
 
UnsignedInt m_startTimestamp
 timestamp when this particle system was (re)started
 
UnsignedInt m_systemLifetimeLeft
 lifetime remaining for entire particle system
 
UnsignedInt m_personalityStore
 so that each particle gets an ever greater number
 
Real m_accumulatedSizeBonus
 For a system that wants to make particles start bigger and bigger. StartSizeRate.
 
Coord3D m_velCoeff
 scalar value multiplied by all velocity parameters
 
Real m_countCoeff
 scalar value multiplied by burst count
 
Real m_delayCoeff
 scalar value multiplied by burst delay
 
Real m_sizeCoeff
 scalar value multiplied by initial size
 
Coord3D m_pos
 this is the position to emit at.
 
Coord3D m_lastPos
 this is the previous position we emitted at.
 
ParticleSystemm_slaveSystem
 if non-NULL, another system this one has control of
 
ParticleSystemID m_slaveSystemID
 id of slave system (if present)
 
ParticleSystemm_masterSystem
 if non-NULL, the system that controls this one
 
ParticleSystemID m_masterSystemID
 master system id (if present);
 
const ParticleSystemTemplatem_template
 the template this system was constructed from
 
Particlem_controlParticle
 if non-NULL, this system is controlled by this particle
 
Bool m_isLocalIdentity
 if true, the matrix can be ignored
 
Bool m_isIdentity
 if true, the matrix can be ignored
 
Bool m_isForever
 System has infinite lifetime.
 
Bool m_isStopped
 if stopped, do not emit particles
 
Bool m_isDestroyed
 are we destroyed and waiting for particles to die
 
Bool m_isFirstPos
 true if this system hasn't been drawn before.
 
Bool m_isSaveable
 true if this system should be saved/loaded
 
Bool m_skipParentXfrm
 true if this system is already in world space.
 

Additional Inherited Members

- Public Types inherited from ParticleSystemInfo
enum  ParticleShaderType {
  INVALID_SHADER =0 , ADDITIVE , ALPHA , ALPHA_TEST ,
  MULTIPLY
}
 
enum  ParticleType {
  INVALID_TYPE =0 , PARTICLE , DRAWABLE , STREAK ,
  VOLUME_PARTICLE , SMUDGE
}
 
enum  EmissionVelocityType {
  INVALID_VELOCITY =0 , ORTHO , SPHERICAL , HEMISPHERICAL ,
  CYLINDRICAL , OUTWARD
}
 
enum  EmissionVolumeType {
  INVALID_VOLUME =0 , POINT , LINE , BOX ,
  SPHERE , CYLINDER
}
 
enum  WindMotion { WIND_MOTION_INVALID = 0 , WIND_MOTION_NOT_USED , WIND_MOTION_PING_PONG , WIND_MOTION_CIRCULAR }
 
typedef Int Color
 
- Public Attributes inherited from ParticleSystemInfo
Bool m_isOneShot
 if true, destroy system after one burst has occurred
 
enum ParticleSystemInfo::ParticleShaderType m_shaderType
 how this particle is rendered
 
enum ParticleSystemInfo::ParticleType m_particleType
 
AsciiString m_particleTypeName
 if PARTICLE, texture filename, if DRAWABLE, Drawable name
 
GameClientRandomVariable m_angleZ
 initial angle around Z axis
 
GameClientRandomVariable m_angularRateZ
 initial angle around Z axis
 
GameClientRandomVariable m_angularDamping
 angular velocity damping coefficient
 
GameClientRandomVariable m_velDamping
 velocity damping factor
 
GameClientRandomVariable m_lifetime
 lifetime of emitted particles
 
UnsignedInt m_systemLifetime
 lifetime of the particle system
 
GameClientRandomVariable m_startSize
 initial size of emitted particles
 
GameClientRandomVariable m_startSizeRate
 change in start size of emitted particles
 
GameClientRandomVariable m_sizeRate
 rate of change of size
 
GameClientRandomVariable m_sizeRateDamping
 damping of size change
 
UnsignedInt m_volumeParticleDepth
 how many layers deep to draw the particle, if >1
 
RandomKeyframe m_alphaKey [MAX_KEYFRAMES]
 
RGBColorKeyframe m_colorKey [MAX_KEYFRAMES]
 color of particle
 
GameClientRandomVariable m_colorScale
 color coefficient
 
GameClientRandomVariable m_burstDelay
 time between particle emissions
 
GameClientRandomVariable m_burstCount
 number of particles emitted per burst
 
GameClientRandomVariable m_initialDelay
 delay before particles begin emitting
 
Coord3D m_driftVelocity
 additional velocity added to all particles
 
Real m_gravity
 gravity acceleration (global Z) for particles in this system
 
AsciiString m_slaveSystemName
 if non-empty, create a system whose particles track this system's
 
Coord3D m_slavePosOffset
 positional offset of slave particles relative to master's
 
AsciiString m_attachedSystemName
 if non-empty, create a system attached to each particle of this system
 
enum ParticleSystemInfo::EmissionVelocityType m_emissionVelocityType
 
ParticlePriorityType m_priority
 
union { 
 
   struct { 
 
      GameClientRandomVariable   x 
 initial speed of particle along X axis More...
 
      GameClientRandomVariable   y 
 initial speed of particle along Y axis More...
 
      GameClientRandomVariable   z 
 initial speed of particle along Z axis More...
 
   }   ortho 
 
   struct { 
 
      GameClientRandomVariable   speed 
 initial speed of particle along random radial direction More...
 
   }   spherical 
 
   struct { 
 
      GameClientRandomVariable   speed 
 initial speed of particle along random radial direction More...
 
   }   hemispherical 
 
   struct { 
 
      GameClientRandomVariable   radial 
 initial speed of particle in the disk More...
 
      GameClientRandomVariable   normal 
 initial speed of particle perpendicular to disk More...
 
   }   cylindrical 
 
   struct { 
 
      GameClientRandomVariable   speed 
 speed outward from emission volume More...
 
      GameClientRandomVariable   otherSpeed 
 speed along "other" axis, such as cylinder length More...
 
   }   outward 
 
m_emissionVelocity 
 
enum ParticleSystemInfo::EmissionVolumeType m_emissionVolumeType
 the type of volume where particles are created
 
union ParticleSystemInfo::emissionVolumeUnion m_emissionVolume
 the dimensions of the emission volume
 
Bool m_isEmissionVolumeHollow
 if true, only create particles at boundary of volume
 
Bool m_isGroundAligned
 if true, align with the ground. if false, then do the normal billboarding.
 
Bool m_isEmitAboveGroundOnly
 if true, only emit particles when the system is above ground.
 
Bool m_isParticleUpTowardsEmitter
 if true, align the up direction to be towards the emitter.
 
WindMotion m_windMotion
 motion of the wind angle updating
 
Real m_windAngle
 angle of the "wind" associated with this system
 
Real m_windAngleChange
 current how fast the angle changes (higher=faster change)
 
Real m_windAngleChangeMin
 min for angle change
 
Real m_windAngleChangeMax
 max for angle change
 
Real m_windMotionStartAngle
 (for ping pong) angle 1 of the ping pong
 
Real m_windMotionStartAngleMin
 (for ping pong) min angle for angle 1
 
Real m_windMotionStartAngleMax
 (for ping pong) max angle for angle 1
 
Real m_windMotionEndAngle
 (for ping pong) angle 2 of the ping pong
 
Real m_windMotionEndAngleMin
 (for ping pong) min angle for angle 2
 
Real m_windMotionEndAngleMax
 (for ping pong) max angel for angle 2
 
Byte m_windMotionMovingToEndAngle
 (for ping pong) TRUE if we're moving "towards" the end angle
 

Detailed Description

A particle system, responsible for creating Particles. If a particle system has finished, but still has particles "in the air", it must wait before destroying itself in order to ensure everything can be cleaned up if the system is reset.

Definition at line 527 of file ParticleSys.h.

Constructor & Destructor Documentation

◆ ParticleSystem()

ParticleSystem::ParticleSystem ( const ParticleSystemTemplate * sysTemplate,
ParticleSystemID id,
Bool createSlaves )

create a particle system from a template and assign it this ID

Read particle system properties from given file

Todo
: further formalize this parameter with an UnsignedInt field in the editor
Todo
It is confusing to do this conversion here...

Definition at line 1035 of file ParticleSys.cpp.

Member Function Documentation

◆ addParticle()

void ParticleSystem::addParticle ( Particle * particleToAdd)

Definition at line 2243 of file ParticleSys.cpp.

◆ attachToDrawable()

void ParticleSystem::attachToDrawable ( const Drawable * draw)

attach this particle system to a Drawable

Attach this particle system to a Drawable

Definition at line 1352 of file ParticleSys.cpp.

◆ attachToObject()

void ParticleSystem::attachToObject ( const Object * obj)

attach this particle system to an Object

Attach this particle system to a Drawable

Definition at line 1363 of file ParticleSys.cpp.

◆ computeParticlePosition()

const Coord3D * ParticleSystem::computeParticlePosition ( void )
protected

compute a position based on emission properties

Compute a position based on emission properties

Definition at line 1552 of file ParticleSys.cpp.

◆ computeParticleVelocity()

const Coord3D * ParticleSystem::computeParticleVelocity ( const Coord3D * pos)
protected

compute a velocity vector based on emission properties

Compute a velocity vector based on emission properties

<

Todo
Implement BOX OUTWARD velocity

Definition at line 1395 of file ParticleSys.cpp.

◆ computePointOnUnitSphere()

const Coord3D * ParticleSystem::computePointOnUnitSphere ( void )
protected

compute a random point on a unit sphere

Compute a random point on a unit sphere

Todo
The density of random points generated is not uniform within the sphere

Definition at line 1375 of file ParticleSys.cpp.

◆ crc()

void ParticleSystem::crc ( Xfer * xfer)
protectedvirtual

CRC

Reimplemented from ParticleSystemInfo.

Definition at line 2391 of file ParticleSys.cpp.

◆ createParticle()

Particle * ParticleSystem::createParticle ( const ParticleInfo * info,
ParticlePriorityType priority,
Bool forceCreate = FALSE )
protectedvirtual

factory method for particles

Factory method for particles.

Definition at line 1677 of file ParticleSys.cpp.

◆ destroy()

void ParticleSystem::destroy ( void )

stop emitting, and wait for particles to die, then destroy self

Stop emitting, wait for all of our particles to die, then destroy self.

Definition at line 1279 of file ParticleSys.cpp.

◆ detachControlParticle()

void ParticleSystem::detachControlParticle ( Particle * p)
inline

called when the particle this system is controlled by dies

Definition at line 607 of file ParticleSys.h.

◆ generateParticleInfo()

const ParticleInfo * ParticleSystem::generateParticleInfo ( Int particleNum,
Int particleCount )
protected

generate a new, random set of ParticleInfo

Generate a new, random set of ParticleInfo particleNum and particleCount are used to get 'tween frame particles emitted in the correct place. (jkmcd)

Todo
Avoid conversion from Coord3D to Vector3 somehow

Definition at line 1738 of file ParticleSys.cpp.

◆ getAttachedDrawable()

DrawableID ParticleSystem::getAttachedDrawable ( void )
inline

Definition at line 625 of file ParticleSys.h.

◆ getAttachedObject()

ObjectID ParticleSystem::getAttachedObject ( void )
inline

Definition at line 624 of file ParticleSys.h.

◆ getBurstCountMultiplier()

Real ParticleSystem::getBurstCountMultiplier ( void )
inline

Definition at line 567 of file ParticleSys.h.

◆ getBurstDelayMultiplier()

Real ParticleSystem::getBurstDelayMultiplier ( void )
inline

Definition at line 570 of file ParticleSys.h.

◆ getDriftVelocity()

const Coord3D * ParticleSystem::getDriftVelocity ( void )
inline

get the drift velocity of the system

Definition at line 549 of file ParticleSys.h.

◆ getEmisionVolumeType()

EmissionVolumeType ParticleSystem::getEmisionVolumeType ( ) const
inline

Definition at line 630 of file ParticleSys.h.

◆ getFirstParticle()

Particle * ParticleSystem::getFirstParticle ( void )
inline

Definition at line 617 of file ParticleSys.h.

◆ getMaster()

ParticleSystem * ParticleSystem::getMaster ( void )
inline

Definition at line 593 of file ParticleSys.h.

◆ getParticleCount()

UnsignedInt ParticleSystem::getParticleCount ( void ) const
inline

Definition at line 622 of file ParticleSys.h.

◆ getParticleTypeName()

AsciiString ParticleSystem::getParticleTypeName ( void )
inline

return the name of the particles

Definition at line 580 of file ParticleSys.h.

◆ getPosition()

void ParticleSystem::getPosition ( Coord3D * pos)

get the position of the particle system

Get the position of the particle system

Definition at line 1291 of file ParticleSys.cpp.

◆ getPriority()

ParticlePriorityType ParticleSystem::getPriority ( ) const
inline

Definition at line 631 of file ParticleSys.h.

◆ getShaderType()

ParticleShaderType ParticleSystem::getShaderType ( void )
inline

Definition at line 588 of file ParticleSys.h.

◆ getSizeMultiplier()

Real ParticleSystem::getSizeMultiplier ( void )
inline

Definition at line 573 of file ParticleSys.h.

◆ getSlave()

ParticleSystem * ParticleSystem::getSlave ( void )
inline

Definition at line 591 of file ParticleSys.h.

◆ getSlavePositionOffset()

const Coord3D * ParticleSystem::getSlavePositionOffset ( void )
inline

Definition at line 594 of file ParticleSys.h.

◆ getStartFrame()

UnsignedInt ParticleSystem::getStartFrame ( void )
inline

return frame when this system was created

Definition at line 600 of file ParticleSys.h.

◆ getSystemID()

ParticleSystemID ParticleSystem::getSystemID ( void ) const
inline

get unique system ID

Definition at line 539 of file ParticleSys.h.

◆ getTemplate()

const ParticleSystemTemplate * ParticleSystem::getTemplate ( void )
inline

get the template used to create this system

Todo
Const this (MSB)

Definition at line 614 of file ParticleSys.h.

◆ getVelocityMultiplier()

const Coord3D * ParticleSystem::getVelocityMultiplier ( void )
inline

get the velocity multiplier coefficient

Definition at line 564 of file ParticleSys.h.

◆ getVolumeParticleDepth()

UnsignedInt ParticleSystem::getVolumeParticleDepth ( void )
inline

Definition at line 584 of file ParticleSys.h.

◆ getWindAngle()

Real ParticleSystem::getWindAngle ( void )
inline

Definition at line 634 of file ParticleSys.h.

◆ getWindMotion()

WindMotion ParticleSystem::getWindMotion ( void )
inline

Definition at line 635 of file ParticleSys.h.

◆ isDestroyed()

Bool ParticleSystem::isDestroyed ( void ) const
inline

Definition at line 601 of file ParticleSys.h.

◆ isSaveable()

Bool ParticleSystem::isSaveable ( void ) const
inline

Definition at line 604 of file ParticleSys.h.

◆ isSystemForever()

Bool ParticleSystem::isSystemForever ( ) const
inline

Definition at line 598 of file ParticleSys.h.

◆ isUsingDrawables()

Bool ParticleSystem::isUsingDrawables ( void )
inline

Definition at line 581 of file ParticleSys.h.

◆ isUsingSmudge()

Bool ParticleSystem::isUsingSmudge ( void )
inline

Definition at line 583 of file ParticleSys.h.

◆ isUsingStreak()

Bool ParticleSystem::isUsingStreak ( void )
inline

Definition at line 582 of file ParticleSys.h.

◆ loadPostProcess()

void ParticleSystem::loadPostProcess ( void )
protectedvirtual

Load post process

Reimplemented from ParticleSystemInfo.

Definition at line 2537 of file ParticleSys.cpp.

◆ mergeRelatedParticleSystems()

ParticleInfo ParticleSystem::mergeRelatedParticleSystems ( ParticleSystem * masterParticleSystem,
ParticleSystem * slaveParticleSystem,
Bool slaveNeedsFullPromotion )
static

called to merge two systems info. If slaveNeedsFullPromotion is true, then the slave needs to be aware of how many particles to generate as well.

Definition at line 2300 of file ParticleSys.cpp.

◆ removeParticle()

void ParticleSystem::removeParticle ( Particle * particleToRemove)

when a particle dies, it calls this method - ONLY FOR USE BY PARTICLE

Remove given particle from the list - ONLY FOR USE BY PARTICLE

Definition at line 2276 of file ParticleSys.cpp.

◆ rotateLocalTransformX()

void ParticleSystem::rotateLocalTransformX ( Real x)

rotate local transform matrix

Rotate local transform matrix

Definition at line 1325 of file ParticleSys.cpp.

◆ rotateLocalTransformY()

void ParticleSystem::rotateLocalTransformY ( Real y)

rotate local transform matrix

Rotate local transform matrix

Definition at line 1334 of file ParticleSys.cpp.

◆ rotateLocalTransformZ()

void ParticleSystem::rotateLocalTransformZ ( Real z)

rotate local transform matrix

Rotate local transform matrix

Definition at line 1343 of file ParticleSys.cpp.

◆ setBurstCountMultiplier()

void ParticleSystem::setBurstCountMultiplier ( Real value)
inline

Definition at line 566 of file ParticleSys.h.

◆ setBurstDelayMultiplier()

void ParticleSystem::setBurstDelayMultiplier ( Real value)
inline

Definition at line 569 of file ParticleSys.h.

◆ setControlParticle()

void ParticleSystem::setControlParticle ( Particle * p)

set control particle

Definition at line 2383 of file ParticleSys.cpp.

◆ setEmissionVolumeCylinderRadius()

void ParticleSystem::setEmissionVolumeCylinderRadius ( Real newRadius)
inline

Definition at line 629 of file ParticleSys.h.

◆ setEmissionVolumeSphereRadius()

void ParticleSystem::setEmissionVolumeSphereRadius ( Real newRadius)
inline

Definition at line 628 of file ParticleSys.h.

◆ setInitialDelay()

void ParticleSystem::setInitialDelay ( UnsignedInt delay)
inline

Definition at line 578 of file ParticleSys.h.

◆ setLifetimeRange()

void ParticleSystem::setLifetimeRange ( Real min,
Real max )

not the particle life, the system!... Lorenzen

Definition at line 2376 of file ParticleSys.cpp.

◆ setLocalTransform()

void ParticleSystem::setLocalTransform ( const Matrix3D * matrix)

set the system's local transform

Set the system's local transform

Definition at line 1316 of file ParticleSys.cpp.

◆ setMaster()

void ParticleSystem::setMaster ( ParticleSystem * master)

make this a slave with a master

Definition at line 1233 of file ParticleSys.cpp.

◆ setPosition()

void ParticleSystem::setPosition ( const Coord3D * pos)

set the position of the particle system

Set the position of the particle system

Definition at line 1305 of file ParticleSys.cpp.

◆ setSaveable()

void ParticleSystem::setSaveable ( Bool b)

Definition at line 1253 of file ParticleSys.cpp.

◆ setSizeMultiplier()

void ParticleSystem::setSizeMultiplier ( Real value)
inline

Definition at line 572 of file ParticleSys.h.

◆ setSkipParentXfrm()

void ParticleSystem::setSkipParentXfrm ( Bool enable)
inline

disable transforming particle system with parent matrix.

Definition at line 547 of file ParticleSys.h.

◆ setSlave()

void ParticleSystem::setSlave ( ParticleSystem * slave)

set a slave system for us

Definition at line 1243 of file ParticleSys.cpp.

◆ setSystemLifetime()

void ParticleSystem::setSystemLifetime ( UnsignedInt frames)
inline

Definition at line 596 of file ParticleSys.h.

◆ setVelocityMultiplier()

void ParticleSystem::setVelocityMultiplier ( const Coord3D * value)
inline

set the velocity multiplier coefficient

Definition at line 563 of file ParticleSys.h.

◆ shouldBillboard()

Bool ParticleSystem::shouldBillboard ( void )
inline

Definition at line 586 of file ParticleSys.h.

◆ start()

void ParticleSystem::start ( void )

(re)start a stopped particle system

(Re)start a stopped particle system

Definition at line 1263 of file ParticleSys.cpp.

◆ stop()

void ParticleSystem::stop ( void )

stop a particle system from emitting

Stop a particle system from emitting

Definition at line 1271 of file ParticleSys.cpp.

◆ trigger()

void ParticleSystem::trigger ( void )
inline

Force a burst of particles to be emitted immediately.

Definition at line 576 of file ParticleSys.h.

◆ update()

Bool ParticleSystem::update ( Int localPlayerIndex)
virtual

update this particle system, return false if dead

Update this particle system, potentially generating new particles

Todo
reset start time when system is stopped/started
Todo
Concatenate this, instead of overriding (MSB)

Definition at line 1849 of file ParticleSys.cpp.

◆ updateWindMotion()

void ParticleSystem::updateWindMotion ( void )

update wind motion

Update the wind motion

Definition at line 2109 of file ParticleSys.cpp.

◆ xfer()

void ParticleSystem::xfer ( Xfer * xfer)
protectedvirtual

Xfer method Version Info: 1: Initial version

Reimplemented from ParticleSystemInfo.

Definition at line 2401 of file ParticleSys.cpp.

Member Data Documentation

◆ m_accumulatedSizeBonus

Real ParticleSystem::m_accumulatedSizeBonus
protected

For a system that wants to make particles start bigger and bigger. StartSizeRate.

Definition at line 675 of file ParticleSys.h.

◆ m_attachedToDrawableID

DrawableID ParticleSystem::m_attachedToDrawableID
protected

if non-zero, system is parented to this Drawable

Definition at line 661 of file ParticleSys.h.

◆ m_attachedToObjectID

ObjectID ParticleSystem::m_attachedToObjectID
protected

if non-zero, system is parented to this Object

Definition at line 662 of file ParticleSys.h.

◆ m_burstDelayLeft

UnsignedInt ParticleSystem::m_burstDelayLeft
protected

when zero, emit a particle burst

Definition at line 667 of file ParticleSys.h.

◆ m_controlParticle

Particle* ParticleSystem::m_controlParticle
protected

if non-NULL, this system is controlled by this particle

Definition at line 692 of file ParticleSys.h.

◆ m_countCoeff

Real ParticleSystem::m_countCoeff
protected

scalar value multiplied by burst count

Definition at line 678 of file ParticleSys.h.

◆ m_delayCoeff

Real ParticleSystem::m_delayCoeff
protected

scalar value multiplied by burst delay

Definition at line 679 of file ParticleSys.h.

◆ m_delayLeft

UnsignedInt ParticleSystem::m_delayLeft
protected

decremented until zero

Definition at line 668 of file ParticleSys.h.

◆ m_isDestroyed

Bool ParticleSystem::m_isDestroyed
protected

are we destroyed and waiting for particles to die

Definition at line 698 of file ParticleSys.h.

◆ m_isFirstPos

Bool ParticleSystem::m_isFirstPos
protected

true if this system hasn't been drawn before.

Definition at line 699 of file ParticleSys.h.

◆ m_isForever

Bool ParticleSystem::m_isForever
protected

System has infinite lifetime.

Definition at line 696 of file ParticleSys.h.

◆ m_isIdentity

Bool ParticleSystem::m_isIdentity
protected

if true, the matrix can be ignored

Definition at line 695 of file ParticleSys.h.

◆ m_isLocalIdentity

Bool ParticleSystem::m_isLocalIdentity
protected

if true, the matrix can be ignored

Definition at line 694 of file ParticleSys.h.

◆ m_isSaveable

Bool ParticleSystem::m_isSaveable
protected

true if this system should be saved/loaded

Definition at line 700 of file ParticleSys.h.

◆ m_isStopped

Bool ParticleSystem::m_isStopped
protected

if stopped, do not emit particles

Definition at line 697 of file ParticleSys.h.

◆ m_lastPos

Coord3D ParticleSystem::m_lastPos
protected

this is the previous position we emitted at.

Definition at line 683 of file ParticleSys.h.

◆ m_localTransform

Matrix3D ParticleSystem::m_localTransform
protected

local orientation & position of system

Definition at line 664 of file ParticleSys.h.

◆ m_masterSystem

ParticleSystem* ParticleSystem::m_masterSystem
protected

if non-NULL, the system that controls this one

Definition at line 688 of file ParticleSys.h.

◆ m_masterSystemID

ParticleSystemID ParticleSystem::m_masterSystemID
protected

master system id (if present);

Definition at line 689 of file ParticleSys.h.

◆ m_particleCount

UnsignedInt ParticleSystem::m_particleCount
protected

current count of particles for this system

Definition at line 658 of file ParticleSys.h.

◆ m_personalityStore

UnsignedInt ParticleSystem::m_personalityStore
protected

so that each particle gets an ever greater number

increments each time it is aggigned to each new particle

Definition at line 672 of file ParticleSys.h.

◆ m_pos

Coord3D ParticleSystem::m_pos
protected

this is the position to emit at.

Definition at line 682 of file ParticleSys.h.

◆ m_sizeCoeff

Real ParticleSystem::m_sizeCoeff
protected

scalar value multiplied by initial size

Definition at line 680 of file ParticleSys.h.

◆ m_skipParentXfrm

Bool ParticleSystem::m_skipParentXfrm
protected

true if this system is already in world space.

Definition at line 701 of file ParticleSys.h.

◆ m_slaveSystem

ParticleSystem* ParticleSystem::m_slaveSystem
protected

if non-NULL, another system this one has control of

Definition at line 685 of file ParticleSys.h.

◆ m_slaveSystemID

ParticleSystemID ParticleSystem::m_slaveSystemID
protected

id of slave system (if present)

Definition at line 686 of file ParticleSys.h.

◆ m_startTimestamp

UnsignedInt ParticleSystem::m_startTimestamp
protected

timestamp when this particle system was (re)started

Definition at line 670 of file ParticleSys.h.

◆ m_systemID

ParticleSystemID ParticleSystem::m_systemID
protected

unique id given to this system from the particle system manager

Definition at line 659 of file ParticleSys.h.

◆ m_systemLifetimeLeft

UnsignedInt ParticleSystem::m_systemLifetimeLeft
protected

lifetime remaining for entire particle system

Definition at line 671 of file ParticleSys.h.

◆ m_systemParticlesHead

Particle* ParticleSystem::m_systemParticlesHead
protected

Definition at line 655 of file ParticleSys.h.

◆ m_systemParticlesTail

Particle* ParticleSystem::m_systemParticlesTail
protected

Definition at line 656 of file ParticleSys.h.

◆ m_template

const ParticleSystemTemplate* ParticleSystem::m_template
protected

the template this system was constructed from

Definition at line 691 of file ParticleSys.h.

◆ m_transform

Matrix3D ParticleSystem::m_transform
protected

composite transform of parent Drawable and local

Definition at line 665 of file ParticleSys.h.

◆ m_velCoeff

Coord3D ParticleSystem::m_velCoeff
protected

scalar value multiplied by all velocity parameters

Definition at line 677 of file ParticleSys.h.


The documentation for this class was generated from the following files: