#include <src/orxonox/tools/DynamicRenderable.h>
Public Member Functions | |
DynamicRenderable () | |
Constructor. | |
virtual Real | getBoundingRadius (void) const |
Implementation of SimpleRenderable. | |
virtual Real | getSquaredViewDepth (const Camera *cam) const |
Implementation of SimpleRenderable. | |
void | initialize (RenderOperation::OperationType operationType, bool useIndices) |
Initializes the dynamic renderable. | |
virtual | ~DynamicRenderable () |
Virtual destructor. | |
Protected Member Functions | |
virtual void | createVertexDeclaration ()=0 |
Creates the vertex declaration. | |
virtual void | fillHardwareBuffers ()=0 |
Fills the hardware vertex and index buffers with data. | |
void | prepareHardwareBuffers (size_t vertexCount, size_t indexCount) |
Prepares the hardware buffers for the requested vertex and index counts. | |
Protected Attributes | |
size_t | mIndexBufferCapacity |
Maximum capacity of the currently allocated index buffer. | |
size_t | mVertexBufferCapacity |
Maximum capacity of the currently allocated vertex buffer. |
Ogre::DynamicRenderable::DynamicRenderable | ( | ) |
Constructor.
Ogre::DynamicRenderable::~DynamicRenderable | ( | ) | [virtual] |
Virtual destructor.
virtual void Ogre::DynamicRenderable::createVertexDeclaration | ( | ) | [protected, pure virtual] |
Creates the vertex declaration.
Implemented in Ogre::DynamicLines.
Referenced by initialize().
virtual void Ogre::DynamicRenderable::fillHardwareBuffers | ( | ) | [protected, pure virtual] |
Fills the hardware vertex and index buffers with data.
Implemented in Ogre::DynamicLines.
Real Ogre::DynamicRenderable::getBoundingRadius | ( | void | ) | const [virtual] |
Implementation of SimpleRenderable.
Real Ogre::DynamicRenderable::getSquaredViewDepth | ( | const Camera * | cam | ) | const [virtual] |
void Ogre::DynamicRenderable::initialize | ( | RenderOperation::OperationType | operationType, | |
bool | useIndices | |||
) |
Initializes the dynamic renderable.
operationType | The type of render operation to perform. | |
useIndices | Specifies whether to use indices to determine the vertices to use as input. |
References createVertexDeclaration(), mIndexBufferCapacity, and mVertexBufferCapacity.
Referenced by Ogre::DynamicLines::DynamicLines().
void Ogre::DynamicRenderable::prepareHardwareBuffers | ( | size_t | vertexCount, | |
size_t | indexCount | |||
) | [protected] |
Prepares the hardware buffers for the requested vertex and index counts.
vertexCount | The number of vertices the buffer must hold. | |
indexCount | The number of indices the buffer must hold. This parameter is ignored if not using indices. |
References mIndexBufferCapacity, and mVertexBufferCapacity.
Referenced by Ogre::DynamicLines::fillHardwareBuffers().
size_t Ogre::DynamicRenderable::mIndexBufferCapacity [protected] |
Maximum capacity of the currently allocated index buffer.
Referenced by initialize(), and prepareHardwareBuffers().
size_t Ogre::DynamicRenderable::mVertexBufferCapacity [protected] |
Maximum capacity of the currently allocated vertex buffer.
Referenced by initialize(), and prepareHardwareBuffers().