IRRSystem Class Reference

A particle system adapted to Irrlicht. More...

Inheritance diagram for IRRSystem:
System Registerable Transformable

List of all members.

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 IRRSystemcreate (irr::scene::ISceneNode *parent, irr::scene::ISceneManager *mgr, bool worldTransformed=true, irr::s32 id=-1)
 Creates and registers a new IRRSystem.

Detailed Description

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).

Since:
1.04.00

Definition at line 50 of file SPK_IRRSystem.h.


Constructor & Destructor Documentation

IRRSystem ( irr::scene::ISceneNode *  parent,
irr::scene::ISceneManager *  mgr,
bool  worldTransformed = true,
irr::s32  id = -1 
)

Constructor of IRRSystem.

Parameters:
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

Member Function Documentation

IRRSystem * create ( irr::scene::ISceneNode *  parent,
irr::scene::ISceneManager *  mgr,
bool  worldTransformed = true,
irr::s32  id = -1 
) [static]

Creates and registers a new IRRSystem.

Parameters:
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
Returns:
A new registered IRRSystem

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.

Returns:
the bounding box containing all particles
bool hasFinished (  )  const

Tells whether the system has finished or not.

This method will return true if :

  • There is no more active particles in the system
  • All the emitters in the system are sleeping

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).

Returns:
true if the system has finished, false otherwise

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().

Returns:
true if auto-update is enabled, false if disabled

Definition at line 209 of file SPK_IRRSystem.h.

bool isUpdateOnlyWhenVisible (  )  const

Returns true if auto-update is performed only when visible.

Returns:
True if particles are updated only if the scene node is visible (use setVisible() to change visibility).

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.

Returns:
true if this system is world transformed, false if not

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.

Parameters:
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.

Parameters:
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]

Updates the System of the current time step.

Note that this method updates all groups in the System from first to last.

Parameters:
deltaTime : the time step
Returns:
true if the System is still active (has active groups)

Reimplemented from System.

Definition at line 235 of file SPK_IRRSystem.h.

virtual void updateAbsolutePosition (  )  [virtual]

Updates the absolute transformation of this Irrlicht Node.


Generated on Wed Apr 27 21:09:27 2011 for SPARK Particle Engine by  doxygen 1.6.1