libHSPlasma
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
plParticleSystem Class Reference

#include <plParticleSystem.h>

Inheritance diagram for plParticleSystem:
plModifier plSynchedObject hsKeyedObject plCreatable

Public Types

enum  EffectType { kEffectForce = 0x1, kEffectMisc = 0x2, kEffectConstraint = 0x4 }
enum  MiscFlags { kParticleSystemAlwaysUpdate = 0x1 }

Public Member Functions

 plParticleSystem ()
virtual ~plParticleSystem ()
virtual void read (hsStream *S, plResManager *mgr)
virtual void write (hsStream *S, plResManager *mgr)
plKey getMaterial () const
unsigned int getXTiles () const
unsigned int getYTiles () const
hsVector3 getAccel () const
float getPreSim () const
float getDrag () const
float getWindMult () const
unsigned int getMaxTotalParticles () const
plControllergetAmbientCtl () const
plControllergetDiffuseCtl () const
plControllergetOpacityCtl () const
plControllergetWidthCtl () const
plControllergetHeightCtl () const
void setMaterial (plKey mat)
void setTiles (unsigned int xtiles, unsigned int ytiles)
void setAccel (const hsVector3 &accel)
void setPreSim (float preSim)
void setDrag (float drag)
void setWindMult (float windMult)
void setMaxTotalParticles (unsigned int max)
void setAmbientCtl (plController *ctl)
void setDiffuseCtl (plController *ctl)
void setOpacityCtl (plController *ctl)
void setWidthCtl (plController *ctl)
void setHeightCtl (plController *ctl)
unsigned int getNumValidEmitters () const
unsigned int getMaxEmitters () const
plParticleEmittergetEmitter (size_t idx) const
void allocEmitters (unsigned int max)
void setEmitter (size_t idx, plParticleEmitter *emitter)
void addEmitter (plParticleEmitter *emitter)
void delEmitter (size_t idx)
void clearEmitters ()
const std::vector< plKey > & getForces () const
std::vector< plKey > & getForces ()
void addForce (plKey force)
void delForce (size_t idx)
void clearForces ()
const std::vector< plKey > & getEffects () const
std::vector< plKey > & getEffects ()
void addEffect (plKey force)
void delEffect (size_t idx)
void clearEffects ()
const std::vector< plKey > & getConstraints () const
std::vector< plKey > & getConstraints ()
void addConstraint (plKey force)
void delConstraint (size_t idx)
void clearConstraints ()
const std::vector< plKey > & getPermaLights () const
std::vector< plKey > & getPermaLights ()
void addPermaLight (plKey force)
void delPermaLight (size_t idx)
void clearPermaLights ()
- Public Member Functions inherited from plModifier
virtual size_t getTargetsCount () const
virtual plKey getTarget (size_t) const
virtual void addTarget (plKey)
virtual void removeTarget (plKey)
- Public Member Functions inherited from plSynchedObject
 plSynchedObject ()
int getFlags () const
void setFlags (int flags)
const std::vector< plString > & getExcludes () const
const std::vector< plString > & getVolatiles () const
void setExclude (const plString &sdl)
void setVolatile (const plString &sdl)
void clearExcludes ()
void clearVolatiles ()
- Public Member Functions inherited from hsKeyedObject
void init (const plString &name)
plKey getKey () const
void setKey (plKey key)
- Public Member Functions inherited from plCreatable
 plCreatable ()
virtual ~plCreatable ()
virtual short ClassIndex () const =0
short ClassIndex (PlasmaVer ver) const
virtual const char * ClassName () const
virtual bool ClassInstance (short) const
virtual bool isStub () const
virtual void prcWrite (pfPrcHelper *prc)
virtual void prcParse (const pfPrcTag *tag, plResManager *mgr)

Protected Member Functions

virtual void IPrcWrite (pfPrcHelper *prc)
virtual void IPrcParse (const pfPrcTag *tag, plResManager *mgr)

Protected Attributes

plKey fMaterial
unsigned int fXTiles
unsigned int fYTiles
hsVector3 fAccel
float fPreSim
float fDrag
float fWindMult
unsigned int fMaxTotalParticles
unsigned int fNumValidEmitters
unsigned int fMaxEmitters
std::vector< plParticleEmitter * > fEmitters
std::vector< plKeyfForces
std::vector< plKeyfEffects
std::vector< plKeyfConstraints
std::vector< plKeyfPermaLights
plControllerfAmbientCtl
plControllerfDiffuseCtl
plControllerfOpacityCtl
plControllerfWidthCtl
plControllerfHeightCtl

Member Enumeration Documentation

Enumerator:
kEffectForce 
kEffectMisc 
kEffectConstraint 
Enumerator:
kParticleSystemAlwaysUpdate 

Constructor & Destructor Documentation

plParticleSystem::plParticleSystem ( )
virtual plParticleSystem::~plParticleSystem ( )
virtual

Member Function Documentation

void plParticleSystem::addConstraint ( plKey  force)
void plParticleSystem::addEffect ( plKey  force)
void plParticleSystem::addEmitter ( plParticleEmitter emitter)
void plParticleSystem::addForce ( plKey  force)
void plParticleSystem::addPermaLight ( plKey  force)
void plParticleSystem::allocEmitters ( unsigned int  max)
void plParticleSystem::clearConstraints ( )
void plParticleSystem::clearEffects ( )
void plParticleSystem::clearEmitters ( )
void plParticleSystem::clearForces ( )
void plParticleSystem::clearPermaLights ( )
void plParticleSystem::delConstraint ( size_t  idx)
void plParticleSystem::delEffect ( size_t  idx)
void plParticleSystem::delEmitter ( size_t  idx)
void plParticleSystem::delForce ( size_t  idx)
void plParticleSystem::delPermaLight ( size_t  idx)
hsVector3 plParticleSystem::getAccel ( ) const
plController* plParticleSystem::getAmbientCtl ( ) const
const std::vector<plKey>& plParticleSystem::getConstraints ( ) const
std::vector<plKey>& plParticleSystem::getConstraints ( )
plController* plParticleSystem::getDiffuseCtl ( ) const
float plParticleSystem::getDrag ( ) const
const std::vector<plKey>& plParticleSystem::getEffects ( ) const
std::vector<plKey>& plParticleSystem::getEffects ( )
plParticleEmitter* plParticleSystem::getEmitter ( size_t  idx) const
const std::vector<plKey>& plParticleSystem::getForces ( ) const
std::vector<plKey>& plParticleSystem::getForces ( )
plController* plParticleSystem::getHeightCtl ( ) const
plKey plParticleSystem::getMaterial ( ) const
unsigned int plParticleSystem::getMaxEmitters ( ) const
unsigned int plParticleSystem::getMaxTotalParticles ( ) const
unsigned int plParticleSystem::getNumValidEmitters ( ) const
plController* plParticleSystem::getOpacityCtl ( ) const
const std::vector<plKey>& plParticleSystem::getPermaLights ( ) const
std::vector<plKey>& plParticleSystem::getPermaLights ( )
float plParticleSystem::getPreSim ( ) const
plController* plParticleSystem::getWidthCtl ( ) const
float plParticleSystem::getWindMult ( ) const
unsigned int plParticleSystem::getXTiles ( ) const
unsigned int plParticleSystem::getYTiles ( ) const
virtual void plParticleSystem::IPrcParse ( const pfPrcTag tag,
plResManager mgr 
)
protectedvirtual

This must be overloaded by subclasses to parse PRC data specific to the class from the PRC document. It is called once for each tag that is a child to the Creatable tag itself, so subclasses should check for each supported tag and handle it accordingly if it matches. If the tag is not recognized, it should be passed along to the parent class.

Reimplemented from plSynchedObject.

virtual void plParticleSystem::IPrcWrite ( pfPrcHelper prc)
protectedvirtual

This must be overloaded by subclasses to write PRC data specific to the class to the PRC document. Do not write the top-level creatable tag, that is handled by prcWrite().

Reimplemented from plSynchedObject.

virtual void plParticleSystem::read ( hsStream ,
plResManager  
)
virtual

Reads this creatable directly from the stream. If any keys are read, they will be added to the plResManager automatically.

Reimplemented from plSynchedObject.

void plParticleSystem::setAccel ( const hsVector3 accel)
void plParticleSystem::setAmbientCtl ( plController ctl)
void plParticleSystem::setDiffuseCtl ( plController ctl)
void plParticleSystem::setDrag ( float  drag)
void plParticleSystem::setEmitter ( size_t  idx,
plParticleEmitter emitter 
)
void plParticleSystem::setHeightCtl ( plController ctl)
void plParticleSystem::setMaterial ( plKey  mat)
void plParticleSystem::setMaxTotalParticles ( unsigned int  max)
void plParticleSystem::setOpacityCtl ( plController ctl)
void plParticleSystem::setPreSim ( float  preSim)
void plParticleSystem::setTiles ( unsigned int  xtiles,
unsigned int  ytiles 
)
void plParticleSystem::setWidthCtl ( plController ctl)
void plParticleSystem::setWindMult ( float  windMult)
virtual void plParticleSystem::write ( hsStream ,
plResManager  
)
virtual

Writes this creatable directly to the stream. The plResManager is used to manage any key references written by this creatable.

Reimplemented from plSynchedObject.

Member Data Documentation

hsVector3 plParticleSystem::fAccel
protected
plController* plParticleSystem::fAmbientCtl
protected
std::vector<plKey> plParticleSystem::fConstraints
protected
plController* plParticleSystem::fDiffuseCtl
protected
float plParticleSystem::fDrag
protected
std::vector<plKey> plParticleSystem::fEffects
protected
std::vector<plParticleEmitter*> plParticleSystem::fEmitters
protected
std::vector<plKey> plParticleSystem::fForces
protected
plController* plParticleSystem::fHeightCtl
protected
plKey plParticleSystem::fMaterial
protected
unsigned int plParticleSystem::fMaxEmitters
protected
unsigned int plParticleSystem::fMaxTotalParticles
protected
unsigned int plParticleSystem::fNumValidEmitters
protected
plController* plParticleSystem::fOpacityCtl
protected
std::vector<plKey> plParticleSystem::fPermaLights
protected
float plParticleSystem::fPreSim
protected
plController* plParticleSystem::fWidthCtl
protected
float plParticleSystem::fWindMult
protected
unsigned int plParticleSystem::fXTiles
protected
unsigned int plParticleSystem::fYTiles
protected

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