A Renderer drawing particles as OpenGL lines. More...
Public Member Functions | |
GLLineRenderer (float length=1.0f, float width=1.0f) | |
Constructor of GLLineRenderer. | |
virtual void | createBuffers (const Group &group) |
Creates the buffers for this buffer handler in the given group. | |
virtual void | destroyBuffers (const Group &group) |
Destroys the buffers for this buffer handler in the given group. | |
virtual void | render (const Group &group) |
Renders a Group of particles. | |
Static Public Member Functions | |
static GLLineRenderer * | create (float length=1.0f, float width=1.0f) |
Creates and registers a new GLLineRenderer. | |
Protected Member Functions | |
virtual bool | checkBuffers (const Group &group) |
checks the buffers and prepare them |
A Renderer drawing particles as OpenGL lines.
The length of the lines is function of the Particle velocity and is defined in the universe space while the width is fixed and defines in the screen space (in pixels).
Below are the parameters of Particle that are used in this Renderer (others have no effects) :
Definition at line 48 of file SPK_GLLineRenderer.h.
GLLineRenderer | ( | float | length = 1.0f , |
|
float | width = 1.0f | |||
) |
Constructor of GLLineRenderer.
length | : the length multiplier of this GLLineRenderer | |
width | : the width of this GLLineRenderer in pixels |
virtual bool checkBuffers | ( | const Group & | group | ) | [protected, virtual] |
checks the buffers and prepare them
This method has to be implemented in derived class that uses buffers.
true must be returned if the buffers are found and initialized, false otherwise.
group | : the group in which to check the buffers |
Reimplemented from BufferHandler.
GLLineRenderer * create | ( | float | length = 1.0f , |
|
float | width = 1.0f | |||
) | [static] |
Creates and registers a new GLLineRenderer.
length | : the length multiplier of this GLLineRenderer | |
width | : the width of this GLLineRenderer in pixels |
Definition at line 98 of file SPK_GLLineRenderer.h.
virtual 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.
virtual void destroyBuffers | ( | const Group & | group | ) | [virtual] |
Destroys the buffers for this buffer handler in the given group.
if the buffers dont exist, nothing happens.
This method has to be overridden in derived classes that use buffers
group | : the Group in which to destroy the buffers for this buffer handler |
Reimplemented from BufferHandler.