Panda3D
Public Member Functions | Static Public Member Functions | List of all members
ParticleSystem Class Reference

Contains and manages a particle system. More...

Inheritance diagram for ParticleSystem:
Physical TypedReferenceCount TypedObject ReferenceCount Particles

Public Member Functions

 __init__ (const ParticleSystem copy)
 Copy Constructor. More...
 
 __init__ (int pool_size)
 Default Constructor. More...
 
 addSpawnTemplate (ParticleSystem ps)
 
 clearFloorZ ()
 
 clearSpawnTemplates ()
 
 clearToInitial ()
 Resets the system to its start state by resizing to 0, then resizing back to current size. More...
 
bool getActiveSystemFlag ()
 
float getBirthRate ()
 
BaseParticleEmitter getEmitter ()
 
BaseParticleFactory getFactory ()
 
float getFloorZ ()
 
bool getIWasSpawnedFlag ()
 
int getLitterSize ()
 
int getLitterSpread ()
 
int getLivingParticles ()
 
bool getLocalVelocityFlag ()
 
int getPoolSize ()
 
BaseParticleRenderer getRenderer ()
 
NodePath getRenderParent ()
 
float getSoftBirthRate ()
 
bool getSpawnOnDeathFlag ()
 
PandaNode getSpawnRenderNode ()
 
NodePath getSpawnRenderNodePath ()
 
float getSystemAge ()
 
bool getSystemGrowsOlderFlag ()
 
float getSystemLifespan ()
 
 induceLabor ()
 Forces the birth of a particle litter this frame by resetting _tics_since_birth. More...
 
 render ()
 Populates an attached GeomNode structure with the particle geometry for rendering. More...
 
 setActiveSystemFlag (bool a)
 
 setBirthRate (float new_br)
 
 setEmitter (BaseParticleEmitter e)
 
 setFactory (BaseParticleFactory f)
 
 setFloorZ (float z)
 
 setLitterSize (int new_ls)
 
 setLitterSpread (int new_ls)
 
 setLocalVelocityFlag (bool lv)
 
 setPoolSize (int size)
 
 setRenderer (BaseParticleRenderer r)
 
 setRenderParent (const NodePath node)
 
 setRenderParent (PandaNode node)
 
 setSoftBirthRate (float new_br)
 
 setSpawnOnDeathFlag (bool sod)
 
 setSpawnRenderNode (PandaNode node)
 
 setSpawnRenderNodePath (const NodePath node)
 
 setSystemAge (float age)
 
 setSystemGrowsOlderFlag (bool sgo)
 
 setSystemLifespan (float sl)
 
 setTemplateSystemFlag (bool tsf)
 
 softStart (float br)
 Causes system to use birth rate set by set_birth_rate() More...
 
 softStop (float br)
 Causes system to use birth rate set by set_soft_birth_rate() More...
 
 update (float dt)
 
 writeFreeParticleFifo (Ostream out, int indent)
 Write a string representation of this instance to <out>. More...
 
 writeSpawnTemplates (Ostream out, int indent)
 Write a string representation of this instance to <out>. More...
 
- Public Member Functions inherited from Physical
 __init__ (const Physical copy)
 copy constructor (note- does deep copy of pn's) but does NOT attach itself to its template's physicsmanager. More...
 
 __init__ (int total_objects, bool pre_alloc)
 Default Constructor The idea here is that most physicals will NOT be collections of sets (i.e. More...
 
 addAngularForce (AngularForce f)
 Adds an angular force to the force list. More...
 
 addLinearForce (LinearForce f)
 Adds a linear force to the force list. More...
 
 addPhysicsObject (PhysicsObject po)
 Adds an object to the physics object vector. More...
 
 clearAngularForces ()
 Erases the angular force list. More...
 
 clearLinearForces ()
 Erases the linear force list. More...
 
 clearPhysicsObjects ()
 Erases the object list. More...
 
AngularForce getAngularForce (int index)
 
list getAngularForces ()
 
LinearForce getLinearForce (int index)
 
list getLinearForces ()
 
int getNumAngularForces ()
 
int getNumLinearForces ()
 
const PhysicsObjectCollection getObjects ()
 
PhysicsObject getPhysBody ()
 
PhysicalNode getPhysicalNode ()
 
NodePath getPhysicalNodePath ()
 
PhysicsManager getPhysicsManager ()
 
float getViscosity ()
 Get the local viscosity. More...
 
 output (Ostream out)
 Write a string representation of this instance to <out>. More...
 
 removeAngularForce (AngularForce f)
 removes an angular force from the force list More...
 
 removeLinearForce (LinearForce f)
 removes a linear force from the force list More...
 
 setViscosity (float viscosity)
 Set the local viscosity. More...
 
 write (Ostream out, int indent)
 Write a string representation of this instance to <out>. More...
 
 writeAngularForces (Ostream out, int indent)
 Write a string representation of this instance to <out>. More...
 
 writeLinearForces (Ostream out, int indent)
 Write a string representation of this instance to <out>. More...
 
 writePhysicsObjects (Ostream out, int indent)
 Write a string representation of this instance to <out>. More...
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly. More...
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type. More...
 
- Public Member Functions inherited from ReferenceCount
int getRefCount ()
 Returns the current reference count. More...
 
 ref ()
 Explicitly increments the reference count. More...
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
bool unref ()
 Explicitly decrements the reference count. More...
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from Physical
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 

Additional Inherited Members

- Public Attributes inherited from TypedObject
TypeHandle type
 Returns the TypeHandle representing this object's type. More...
 
- Public Attributes inherited from ReferenceCount
int ref_count
 The current reference count. More...
 

Detailed Description

Contains and manages a particle system.

Member Function Documentation

◆ __init__() [1/2]

__init__ ( const ParticleSystem  copy)

Copy Constructor.

◆ __init__() [2/2]

__init__ ( int  pool_size)

Default Constructor.

◆ addSpawnTemplate()

addSpawnTemplate ( ParticleSystem  ps)

◆ clearFloorZ()

clearFloorZ ( )

◆ clearSpawnTemplates()

clearSpawnTemplates ( )

◆ clearToInitial()

clearToInitial ( )

Resets the system to its start state by resizing to 0, then resizing back to current size.

◆ getActiveSystemFlag()

bool getActiveSystemFlag ( )

◆ getBirthRate()

float getBirthRate ( )

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getEmitter()

BaseParticleEmitter getEmitter ( )

◆ getFactory()

BaseParticleFactory getFactory ( )

◆ getFloorZ()

float getFloorZ ( )

◆ getIWasSpawnedFlag()

bool getIWasSpawnedFlag ( )

◆ getLitterSize()

int getLitterSize ( )

◆ getLitterSpread()

int getLitterSpread ( )

◆ getLivingParticles()

int getLivingParticles ( )

◆ getLocalVelocityFlag()

bool getLocalVelocityFlag ( )

◆ getPoolSize()

int getPoolSize ( )

◆ getRenderer()

BaseParticleRenderer getRenderer ( )

◆ getRenderParent()

NodePath getRenderParent ( )

◆ getSoftBirthRate()

float getSoftBirthRate ( )

◆ getSpawnOnDeathFlag()

bool getSpawnOnDeathFlag ( )

◆ getSpawnRenderNode()

PandaNode getSpawnRenderNode ( )

◆ getSpawnRenderNodePath()

NodePath getSpawnRenderNodePath ( )

◆ getSystemAge()

float getSystemAge ( )

◆ getSystemGrowsOlderFlag()

bool getSystemGrowsOlderFlag ( )

◆ getSystemLifespan()

float getSystemLifespan ( )

◆ induceLabor()

induceLabor ( )

Forces the birth of a particle litter this frame by resetting _tics_since_birth.

◆ render()

render ( )

Populates an attached GeomNode structure with the particle geometry for rendering.

This is a wrapper for accessability.

◆ setActiveSystemFlag()

setActiveSystemFlag ( bool  a)

◆ setBirthRate()

setBirthRate ( float  new_br)

◆ setEmitter()

setEmitter ( BaseParticleEmitter  e)

◆ setFactory()

setFactory ( BaseParticleFactory  f)

◆ setFloorZ()

setFloorZ ( float  z)

◆ setLitterSize()

setLitterSize ( int  new_ls)

◆ setLitterSpread()

setLitterSpread ( int  new_ls)

◆ setLocalVelocityFlag()

setLocalVelocityFlag ( bool  lv)

◆ setPoolSize()

setPoolSize ( int  size)

◆ setRenderer()

setRenderer ( BaseParticleRenderer  r)

◆ setRenderParent() [1/2]

setRenderParent ( const NodePath  node)

◆ setRenderParent() [2/2]

setRenderParent ( PandaNode  node)

◆ setSoftBirthRate()

setSoftBirthRate ( float  new_br)

◆ setSpawnOnDeathFlag()

setSpawnOnDeathFlag ( bool  sod)

◆ setSpawnRenderNode()

setSpawnRenderNode ( PandaNode  node)

◆ setSpawnRenderNodePath()

setSpawnRenderNodePath ( const NodePath  node)

◆ setSystemAge()

setSystemAge ( float  age)

◆ setSystemGrowsOlderFlag()

setSystemGrowsOlderFlag ( bool  sgo)

◆ setSystemLifespan()

setSystemLifespan ( float  sl)

◆ setTemplateSystemFlag()

setTemplateSystemFlag ( bool  tsf)

◆ softStart()

softStart ( float  br)

Causes system to use birth rate set by set_birth_rate()

◆ softStop()

softStop ( float  br)

Causes system to use birth rate set by set_soft_birth_rate()

◆ update()

update ( float  dt)

◆ writeFreeParticleFifo()

writeFreeParticleFifo ( Ostream  out,
int  indent 
)

Write a string representation of this instance to <out>.

◆ writeSpawnTemplates()

writeSpawnTemplates ( Ostream  out,
int  indent 
)

Write a string representation of this instance to <out>.