dtCore::ParticleSystem Class Reference

A particle system. More...

#include <particlesystem.h>

Inheritance diagram for dtCore::ParticleSystem:

dtCore::Transformable dtCore::Loadable dtCore::DeltaDrawable dtCore::Base

List of all members.

Public Member Functions

 ParticleSystem (std::string name="ParticleSystem")
 Constructor.
virtual osg::Node * LoadFile (const std::string &filename, bool useCache=false)
 Load a file from disk.
void SetEnabled (bool enable)
 Enables or disables this particle system.
bool IsEnabled ()
 Checks whether this particle system is enabled.
void SetParentRelative (bool parentRelative)
 Sets the parent-relative state of this particle system.
bool IsParentRelative ()
 Returns the parent-relative state of this particle system.
std::list< ParticleLayer > & GetAllLayers ()
 GetAllLayers can be called to change all the effects that were loaded in to do the same thing.
const std::list< ParticleLayer > & GetAllLayers () const
ParticleLayerGetSingleLayer (const std::string &layerName)
 GetSingleLayer will return the Layer of said name, Null will return if bad name sent in.
void SetAllLayers (const std::list< ParticleLayer > &layersToSet)
 SetAllLayers Will take in the new list of layers and set all the current layers to those of that sent in.
void SetSingleLayer (ParticleLayer &layerToSet)
 SetSingleLayer will take in the layerToSet and set the layer in mlLayers to that sent in.

Protected Member Functions

virtual ~ParticleSystem ()
 Destructor.
void SetupParticleLayers ()
 Called from LoadFile() function, should never be called from user.


Detailed Description

A particle system.

Constructor & Destructor Documentation

ParticleSystem::ParticleSystem ( std::string  name = "ParticleSystem"  ) 

Constructor.

Parameters:
name the instance name

ParticleSystem::~ParticleSystem (  )  [protected, virtual]

Destructor.


Member Function Documentation

osg::Node * ParticleSystem::LoadFile ( const std::string &  filename,
bool  useCache = false 
) [virtual]

Load a file from disk.

This method will load the particle effect from a file.

The loaded particle system will be broken apart, with the Emitter added to the parent MatrixTransform node and the geometry added directly to the Scene.

Parameters:
filename : The file to load. This will use the search paths to locate the file.
useCache : This param gets ignored and is forced to false

Reimplemented from dtCore::Loadable.

void ParticleSystem::SetEnabled ( bool  enable  ) 

Enables or disables this particle system.

Particle systems are enabled by default.

Parameters:
enable true to enable the particle system, false to disable it
enable true to enable the particle system, false to disable it

bool ParticleSystem::IsEnabled (  ) 

Checks whether this particle system is enabled.

Returns:
true if the particle system is enabled, false otherwise

void ParticleSystem::SetParentRelative ( bool  parentRelative  ) 

Sets the parent-relative state of this particle system.

If parent-relative mode is enabled, the entire particle system will be positioned relative to the parent. If disabled, only the emitter will be positioned relative to the parent. By default, particle systems are not parent-relative.

This must be set before loading the particle file.

Parameters:
parentRelative true to enable parent-relative mode, false to disable it
If parent-relative mode is enabled, the entire particle system will be positioned relative to the parent. If disabled, only the emitter will be positioned relative to the parent. By default, particle systems are not parent-relative.

Parameters:
parentRelative true to enable parent-relative mode, false to disable it

bool ParticleSystem::IsParentRelative (  ) 

Returns the parent-relative state of this particle system.

Returns:
true if the particle system is in parent-relative mode, false if not

std::list<ParticleLayer>& dtCore::ParticleSystem::GetAllLayers (  )  [inline]

GetAllLayers can be called to change all the effects that were loaded in to do the same thing.

Returns:
The link list of all the layers

const std::list<ParticleLayer>& dtCore::ParticleSystem::GetAllLayers (  )  const [inline]

ParticleLayer * ParticleSystem::GetSingleLayer ( const std::string &  layerName  ) 

GetSingleLayer will return the Layer of said name, Null will return if bad name sent in.

Returns:
Will return the link list you requested by name

void ParticleSystem::SetAllLayers ( const std::list< ParticleLayer > &  layersToSet  ) 

SetAllLayers Will take in the new list of layers and set all the current layers to those of that sent in.

void ParticleSystem::SetSingleLayer ( ParticleLayer layerToSet  ) 

SetSingleLayer will take in the layerToSet and set the layer in mlLayers to that sent in.

void ParticleSystem::SetupParticleLayers (  )  [protected]

Called from LoadFile() function, should never be called from user.


http://www.delta3d.org
2.0.0 generated 14 Feb 2008