A Renderer drawing particles as quads with Irrlicht. More...
Public Member Functions | |
IRRQuadRenderer (irr::IrrlichtDevice *d, float scaleX=1.0f, float scaleY=1.0f) | |
Constructor of IRRQuadRenderer. | |
void | setTexture (irr::video::ITexture *texture) |
Sets the texture to map on particles. | |
void | setAtlasDimensions (irr::core::dimension2du dim) |
Sets the atlas dimension of the texture in an Irrlicht way. | |
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. | |
irr::core::dimension2du | getAtlasDimensions () const |
Gets the atlas dimension of the texture in an Irrlicht 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 IRRQuadRenderer * | create (irr::IrrlichtDevice *d, float scaleX=1.0f, float scaleY=1.0f) |
Creates and registers a new IRRQuadRenderer. |
A Renderer drawing particles as quads with Irrlicht.
The orientation of the quads depends on the orientation parameters set. This orientation is computed during rendering by the CPU (further improvement of SPARK will allow to make the computation on GPU side).
Below are the parameters of Particle that are used in this Renderer (others have no effects) :
Definition at line 54 of file SPK_IRRQuadRenderer.h.
IRRQuadRenderer | ( | irr::IrrlichtDevice * | d, | |
float | scaleX = 1.0f , |
|||
float | scaleY = 1.0f | |||
) |
Constructor of IRRQuadRenderer.
d | : the Irrlicht device | |
scaleX | the scale of the width of the quad | |
scaleY | the scale of the height of the quad |
IRRQuadRenderer * create | ( | irr::IrrlichtDevice * | d, | |
float | scaleX = 1.0f , |
|||
float | scaleY = 1.0f | |||
) | [static] |
Creates and registers a new IRRQuadRenderer.
d | : the Irrlicht device | |
scaleX | the scale of the width of the quad | |
scaleY | the scale of the height of the quad |
Definition at line 165 of file SPK_IRRQuadRenderer.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.
irr::core::dimension2du getAtlasDimensions | ( | ) | const |
Gets the atlas dimension of the texture in an Irrlicht way.
Definition at line 197 of file SPK_IRRQuadRenderer.h.
const irr::video::SMaterialLayer & getMaterialLayer | ( | ) | const |
Gets the material texture layer in a constant way.
Definition at line 192 of file SPK_IRRQuadRenderer.h.
irr::video::SMaterialLayer & getMaterialLayer | ( | ) |
Gets the material texture layer.
Definition at line 187 of file SPK_IRRQuadRenderer.h.
irr::video::ITexture * getTexture | ( | ) | const |
Gets the texture of this renderer.
Definition at line 182 of file SPK_IRRQuadRenderer.h.
virtual void render | ( | const Group & | group | ) | [virtual] |
void setAtlasDimensions | ( | irr::core::dimension2du | dim | ) |
Sets the atlas dimension of the texture in an Irrlicht way.
see setQuadAtlasDimension(unsigned int,unsigned int) for more information
dim | : the atlas dimension of the texture |
Definition at line 177 of file SPK_IRRQuadRenderer.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 172 of file SPK_IRRQuadRenderer.h.