A Renderer drawing particles as points with Irrlicht. More...
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 IRRPointRenderer * | create (irr::IrrlichtDevice *d, float size=1.0f) |
Creates and registers a new IRRPointRenderer. |
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) :
Definition at line 60 of file SPK_IRRPointRenderer.h.
IRRPointRenderer | ( | irr::IrrlichtDevice * | d, | |
float | size = 1.0f | |||
) |
Constructor of IRRPointRenderer.
d | : the Irrlicht device | |
size | : the size of the points |
IRRPointRenderer * create | ( | irr::IrrlichtDevice * | d, | |
float | size = 1.0f | |||
) | [static] |
Creates and registers a new IRRPointRenderer.
d | : the Irrlicht device | |
size | : the size of the points |
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
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.
Definition at line 172 of file SPK_IRRPointRenderer.h.
irr::video::SMaterialLayer & getMaterialLayer | ( | ) |
Gets the material texture layer.
Definition at line 167 of file SPK_IRRPointRenderer.h.
irr::video::ITexture * getTexture | ( | ) | const |
Gets the texture of this renderer.
Definition at line 162 of file SPK_IRRPointRenderer.h.
virtual void render | ( | const Group & | group | ) | [virtual] |
void setSize | ( | float | size | ) | [virtual] |
Sets the size of the points in this PointRendererInterface.
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
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.
type | : the type of points to use in this PointRendererInterface |
Reimplemented from PointRendererInterface.