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

#include <ParticleSys.h>

Inherits MemoryPoolObject, and ParticleSystemInfo.

Public Member Functions

 ParticleSystemTemplate (const AsciiString &name)
 
AsciiString getName (void) const
 
ParticleSystemcreateSlaveSystem (Bool createSlaves=TRUE) const
 if returns non-NULL, it is a slave system for use
 
const FieldParsegetFieldParse (void) const
 Parsing from INI access.
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 

Static Public Member Functions

static void parseRGBColorKeyframe (INI *ini, void *instance, void *store, const void *)
 
static void parseRandomKeyframe (INI *ini, void *instance, void *store, const void *)
 
static void parseRandomRGBColor (INI *ini, void *instance, void *store, const void *)
 
static void parseRandomRGBColorRate (INI *ini, void *instance, void *store, const void *)
 

Protected Attributes

AsciiString m_name
 the name of this template
 
const ParticleSystemTemplatem_slaveTemplate
 if non-NULL, use this to create a slave system
 
- Protected 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
 

Static Protected Attributes

static const FieldParse m_fieldParseTable []
 the parse table for INI definition
 

Friends

class ParticleSystemManager
 
class ParticleSystem
 
class DebugWindowDialog
 
void _updateAsciiStringParmsToSystem (ParticleSystemTemplate *particleTemplate)
 
void _updateAsciiStringParmsFromSystem (ParticleSystemTemplate *particleTemplate)
 
void _writeSingleParticleSystem (File *out, ParticleSystemTemplate *templ)
 

Additional Inherited Members

- Protected 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
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 
- Protected Member Functions inherited from ParticleSystemInfo
 ParticleSystemInfo ()
 to set defaults.
 
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
void tintAllColors (Color tintColor)
 
 Snapshot (void)
 
 ~Snapshot (void)
 

Detailed Description

A ParticleSystemTemplate, used by the ParticleSystemManager to instantiate ParticleSystems.

Definition at line 482 of file ParticleSys.h.

Constructor & Destructor Documentation

◆ ParticleSystemTemplate()

ParticleSystemTemplate::ParticleSystemTemplate ( const AsciiString & name)

Definition at line 2786 of file ParticleSys.cpp.

Member Function Documentation

◆ createSlaveSystem()

ParticleSystem * ParticleSystemTemplate::createSlaveSystem ( Bool createSlaves = TRUE) const

if returns non-NULL, it is a slave system for use

If returns non-NULL, it is a slave system for use ... the create slaves parameter tells this slave system whether or not it should create any slaves itself automatically during its own constructor

Definition at line 2807 of file ParticleSys.cpp.

◆ getFieldParse()

const FieldParse * ParticleSystemTemplate::getFieldParse ( void ) const
inline

Parsing from INI access.

Definition at line 494 of file ParticleSys.h.

◆ getName()

AsciiString ParticleSystemTemplate::getName ( void ) const
inline

Definition at line 489 of file ParticleSys.h.

◆ parseRandomKeyframe()

void ParticleSystemTemplate::parseRandomKeyframe ( INI * ini,
void * instance,
void * store,
const void *  )
static

Parse a "random keyframe". The format is "FIELD = low high frame".

Definition at line 2707 of file ParticleSys.cpp.

◆ parseRandomRGBColor()

void ParticleSystemTemplate::parseRandomRGBColor ( INI * ini,
void * instance,
void * store,
const void *  )
static

Parse a RandomVariable RGB color. Note that the components may be negative, as this is used for rates, as well.

Definition at line 2737 of file ParticleSys.cpp.

◆ parseRandomRGBColorRate()

static void ParticleSystemTemplate::parseRandomRGBColorRate ( INI * ini,
void * instance,
void * store,
const void *  )
static

◆ parseRGBColorKeyframe()

void ParticleSystemTemplate::parseRGBColorKeyframe ( INI * ini,
void * instance,
void * store,
const void *  )
static

Parse a "color keyframe". The format is "FIELD = R:r G:g B:b frame".

Definition at line 2724 of file ParticleSys.cpp.

Friends And Related Symbol Documentation

◆ _updateAsciiStringParmsFromSystem

void _updateAsciiStringParmsFromSystem ( ParticleSystemTemplate * particleTemplate)
friend

Definition at line 9596 of file ScriptEngine.cpp.

◆ _updateAsciiStringParmsToSystem

void _updateAsciiStringParmsToSystem ( ParticleSystemTemplate * particleTemplate)
friend

Definition at line 9561 of file ScriptEngine.cpp.

◆ _writeSingleParticleSystem

void _writeSingleParticleSystem ( File * out,
ParticleSystemTemplate * templ )
friend

Definition at line 9786 of file ScriptEngine.cpp.

◆ DebugWindowDialog

friend class DebugWindowDialog
friend
Todo
remove this friendship when no longer editing particles

Definition at line 505 of file ParticleSys.h.

◆ ParticleSystem

friend class ParticleSystem
friend
Todo
remove this friendship

Definition at line 502 of file ParticleSys.h.

◆ ParticleSystemManager

friend class ParticleSystemManager
friend
Todo
remove this friendship

Definition at line 501 of file ParticleSys.h.

Member Data Documentation

◆ m_fieldParseTable

const FieldParse ParticleSystemTemplate::m_fieldParseTable
staticprotected

the parse table for INI definition

INI parse data

Definition at line 2606 of file ParticleSys.h.

◆ m_name

AsciiString ParticleSystemTemplate::m_name
protected

the name of this template

Definition at line 513 of file ParticleSys.h.

◆ m_slaveTemplate

const ParticleSystemTemplate* ParticleSystemTemplate::m_slaveTemplate
mutableprotected

if non-NULL, use this to create a slave system

Definition at line 516 of file ParticleSys.h.


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