Rocket::Core::Geometry Class Reference
#include <Geometry.h>
Detailed Description
A helper object for holding an array of vertices and indices, and compiling it as necessary when rendered.
- Author:
- Peter Curry
Member Function Documentation
| void Rocket::Core::Geometry::SetHostElement |
( |
Element * |
host_element |
) |
|
Set the host element for this geometry; this should be passed in the constructor if possible.
- Parameters:
-
| [in] | host_element | The new host element for the geometry. |
| void Rocket::Core::Geometry::Render |
( |
const Vector2f & |
translation |
) |
|
Attempts to compile the geometry if appropriate, then renders the geometry, compiled if it can.
- Parameters:
-
| [in] | translation | The translation of the geometry. |
| std::vector< Vertex > & Rocket::Core::Geometry::GetVertices |
( |
|
) |
|
Returns the geometry's vertices. If these are written to, Release() should be called to force a recompile.
- Returns:
- The geometry's vertex array.
| std::vector< int > & Rocket::Core::Geometry::GetIndices |
( |
|
) |
|
Returns the geometry's indices. If these are written to, Release() should be called to force a recompile.
- Returns:
- The geometry's index array.
| const Texture * Rocket::Core::Geometry::GetTexture |
( |
|
) |
const |
Gets the geometry's texture.
- Returns:
- The geometry's texture.
| void Rocket::Core::Geometry::Release |
( |
bool |
clear_buffers = false |
) |
|
Releases any previously-compiled geometry, and forces any new geometry to have a compile attempted.
- Parameters:
-
| [in] | clear_buffers | True to also clear the vertex and index buffers, false to leave intact. |
The documentation for this class was generated from the following files:
- Include/Rocket/Core/Geometry.h
- Source/Core/Geometry.cpp