IRRPointRenderer Class Reference

A Renderer drawing particles as points with Irrlicht. More...

Inheritance diagram for IRRPointRenderer:
IRRRenderer PointRendererInterface Renderer Registerable BufferHandler

List of all members.

Public Member Functions

 IRRPointRenderer (irr::IrrlichtDevice *d, float size=1.0f)
 Constructor of IRRPointRenderer.
void setTexture (irr::video::ITexture *texture)
 Sets the texture to map on particles.
virtual bool setType (PointType type)
 Sets the type of points to use in this PointRendererInterface.
virtual void setSize (float size)
 Sets the size of the points in this PointRendererInterface.
irr::video::ITexture * getTexture () const
 Gets the texture of this renderer.
irr::video::SMaterialLayer & getMaterialLayer ()
 Gets the material texture layer.
const irr::video::SMaterialLayer & getMaterialLayer () const
 Gets the material texture layer in a constant way.
virtual void render (const Group &group)
 Renders a Group of particles.
void createBuffers (const Group &group)
 Creates the buffers for this buffer handler in the given group.

Static Public Member Functions

static IRRPointRenderercreate (irr::IrrlichtDevice *d, float size=1.0f)
 Creates and registers a new IRRPointRenderer.

Detailed Description

A Renderer drawing particles as points with Irrlicht.

Rendering can be done in 2 ways :

Note that SPK::POINT_CIRCLE cannot be set with this renderer.

Regarding the size of the rendered point, they are dependant of the Irrlicht settings.
Basically size of the points is neither in pixels nor in the universe unit.
Moreover, points are scaling with the distance but are rapidly clamped.
So Irrlicht does not handle point size very well at the moment, maybe it will do better in the future.
In that case, this renderer will become very useful.
Below are the parameters of Particle that are used in this Renderer (others have no effects) :

Since:
1.04.00

Definition at line 60 of file SPK_IRRPointRenderer.h.


Constructor & Destructor Documentation

IRRPointRenderer ( irr::IrrlichtDevice *  d,
float  size = 1.0f 
)

Constructor of IRRPointRenderer.

Parameters:
d : the Irrlicht device
size : the size of the points

Member Function Documentation

IRRPointRenderer * create ( irr::IrrlichtDevice *  d,
float  size = 1.0f 
) [static]

Creates and registers a new IRRPointRenderer.

Parameters:
d : the Irrlicht device
size : the size of the points
Returns:
A new registered IRRPointRenderer

Definition at line 145 of file SPK_IRRPointRenderer.h.

void createBuffers ( const Group group  )  [virtual]

Creates the buffers for this buffer handler in the given group.

If the buffers for this type of buffer handler already exists within the Group, they are priorly destroyed.
The type of buffers created depends on the state of the buffer handler at the time this method is called.

This method has to be overridden in derived classes that use buffers

Parameters:
group : the Group in which to create the buffers for this buffer handler

Reimplemented from BufferHandler.

const irr::video::SMaterialLayer & getMaterialLayer (  )  const

Gets the material texture layer in a constant way.

Returns:
the material texture layer

Definition at line 172 of file SPK_IRRPointRenderer.h.

irr::video::SMaterialLayer & getMaterialLayer (  ) 

Gets the material texture layer.

Returns:
the material texture layer

Definition at line 167 of file SPK_IRRPointRenderer.h.

irr::video::ITexture * getTexture (  )  const

Gets the texture of this renderer.

Returns:
the texture of this renderer

Definition at line 162 of file SPK_IRRPointRenderer.h.

virtual void render ( const Group group  )  [virtual]

Renders a Group of particles.

Parameters:
group : the Group to render

Implements Renderer.

void setSize ( float  size  )  [virtual]

Sets the size of the points in this PointRendererInterface.

Parameters:
size : the size of the points in this PointRendererInterface

Reimplemented from PointRendererInterface.

Definition at line 157 of file SPK_IRRPointRenderer.h.

void setTexture ( irr::video::ITexture *  texture  ) 

Sets the texture to map on particles.

Note that this only works with points being rendered as SPK::POINT_SPRITE

Parameters:
texture : the texture to set

Definition at line 152 of file SPK_IRRPointRenderer.h.

virtual bool setType ( PointType  type  )  [virtual]

Sets the type of points to use in this PointRendererInterface.

If the type is not supported by the platform, false is returned and the type per default is set.

Parameters:
type : the type of points to use in this PointRendererInterface
Returns:
true if the type can be set, false otherwise

Reimplemented from PointRendererInterface.


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