#include <particlesystem.h>

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 |
| ParticleLayer * | GetSingleLayer (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. | |
| ParticleSystem::ParticleSystem | ( | std::string | name = "ParticleSystem" |
) |
Constructor.
| name | the instance name |
| ParticleSystem::~ParticleSystem | ( | ) | [protected, virtual] |
Destructor.
| 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.
| 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.
| 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.
| 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.
| parentRelative | true to enable parent-relative mode, false to disable it |
| parentRelative | true to enable parent-relative mode, false to disable it |
| bool ParticleSystem::IsParentRelative | ( | ) |
Returns the parent-relative state of this particle system.
| 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.
| 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.
| 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.