A particle system adapted to Irrlicht. More...
Public Member Functions | |
IRRSystem (irr::scene::ISceneNode *parent, irr::scene::ISceneManager *mgr, bool worldTransformed=true, irr::s32 id=-1) | |
Constructor of IRRSystem. | |
void | setAutoUpdateEnabled (bool enableState, bool onlyWhenVisible) |
Enables or disables auto update. | |
bool | isAutoUpdateEnabled () const |
Returns true if auto-update is enabled. | |
bool | isUpdateOnlyWhenVisible () const |
Returns true if auto-update is performed only when visible. | |
bool | isWorldTransformed () const |
Tells whether this system is world transformed or not. | |
virtual const irr::core::aabbox3d< irr::f32 > & | getBoundingBox () const |
Gets the bounding box. | |
bool | hasFinished () const |
Tells whether the system has finished or not. | |
virtual bool | update (float deltaTime) |
Updates the System of the current time step. | |
virtual void | render () |
Renders the particles in the system. | |
virtual void | render () const |
Renders the particles in the system. | |
virtual void | OnRegisterSceneNode () |
This method is called just before the rendering process of the whole scene. | |
virtual void | OnAnimate (irr::u32 timeMs) |
This method is called just before rendering the whole scene. | |
virtual void | updateAbsolutePosition () |
Updates the absolute transformation of this Irrlicht Node. | |
Static Public Member Functions | |
static IRRSystem * | create (irr::scene::ISceneNode *parent, irr::scene::ISceneManager *mgr, bool worldTransformed=true, irr::s32 id=-1) |
Creates and registers a new IRRSystem. |
A particle system adapted to Irrlicht.
This particle system is also a scene node, so you can apply transformations on it.
Be aware that only group using Irrlicht as renderer will work correctly.
The particle system is rendered automatically in the render process of Irrlicht.
If specified it can automatically update all particles (auto-update) on animation pass.
It is possible to specify if the system should update particles when not visible.
By default, auto-update is enabled only when visible.
Note also that an IRRSystem takes care of the camera position automatically when distance computation is enabled on one of its Group. Therefore there is no need to call System::setCameraPosition(Vector3D).
Definition at line 50 of file SPK_IRRSystem.h.
IRRSystem | ( | irr::scene::ISceneNode * | parent, | |
irr::scene::ISceneManager * | mgr, | |||
bool | worldTransformed = true , |
|||
irr::s32 | id = -1 | |||
) |
Constructor of IRRSystem.
parent | : the parent node of the particle system | |
mgr | : the Irrlicht scene manager | |
worldTransformed | : true to emit particles in world, false to emit them localy | |
id | : the ID of the node |
IRRSystem * create | ( | irr::scene::ISceneNode * | parent, | |
irr::scene::ISceneManager * | mgr, | |||
bool | worldTransformed = true , |
|||
irr::s32 | id = -1 | |||
) | [static] |
Creates and registers a new IRRSystem.
parent | : the parent node of the particle system | |
mgr | : the Irrlicht scene manager | |
worldTransformed | : true to emit particles in world, false to emit them localy | |
id | : the ID of the node |
Definition at line 202 of file SPK_IRRSystem.h.
virtual const irr::core::aabbox3d<irr::f32>& getBoundingBox | ( | ) | const [virtual] |
Gets the bounding box.
Note that the returned bounding box is invalid if aabb computation is disabled.
bool hasFinished | ( | ) | const |
Tells whether the system has finished or not.
This method will return true if :
The IRRSystem provides an accessor for this as the update can be done within the Irrlicht scene manager. In that case the user cannot get the returned value of update(float).
Definition at line 224 of file SPK_IRRSystem.h.
bool isAutoUpdateEnabled | ( | ) | const |
Returns true if auto-update is enabled.
If true, the scene node will update particles automatically, else the user must call update().
Definition at line 209 of file SPK_IRRSystem.h.
bool isUpdateOnlyWhenVisible | ( | ) | const |
Returns true if auto-update is performed only when visible.
Definition at line 214 of file SPK_IRRSystem.h.
bool isWorldTransformed | ( | ) | const |
Tells whether this system is world transformed or not.
If a system is transformed in the world, only its emitter and zones will be transformed.
The emitted particles will remain independent from the system transformation.
If it is transformed locally, the emitted particles will be transformed as well.
Definition at line 219 of file SPK_IRRSystem.h.
virtual void OnAnimate | ( | irr::u32 | timeMs | ) | [virtual] |
This method is called just before rendering the whole scene.
It should be called only by engine.
timeMs | : Current time in milliseconds |
virtual void OnRegisterSceneNode | ( | ) | [virtual] |
This method is called just before the rendering process of the whole scene.
virtual void render | ( | ) | const [virtual] |
Renders the particles in the system.
(Reimplementation of the SPK::System render method.)
Reimplemented from System.
void render | ( | ) | [virtual] |
Renders the particles in the system.
(Reimplementation of the irr::scene::SceneNode render method.)
Definition at line 242 of file SPK_IRRSystem.h.
void setAutoUpdateEnabled | ( | bool | enableState, | |
bool | onlyWhenVisible | |||
) |
Enables or disables auto update.
enableState | : True to enable auto-update, false to disable it | |
onlyWhenVisible | : True to perform auto-update only if node is visible. This parameter is ignored if auto-update is set to false. |
Definition at line 229 of file SPK_IRRSystem.h.
bool update | ( | float | deltaTime | ) | [virtual] |
virtual void updateAbsolutePosition | ( | ) | [virtual] |
Updates the absolute transformation of this Irrlicht Node.