libRocket
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
Rocket::Core::Geometry Class Reference

#include <Geometry.h>

Public Member Functions

 Geometry (Element *host_element=NULL)
 
 Geometry (Context *host_context)
 
 ~Geometry ()
 
void SetHostElement (Element *host_element)
 
void Render (const Vector2f &translation)
 
std::vector< Vertex > & GetVertices ()
 
std::vector< int > & GetIndices ()
 
const Texture * GetTexture () const
 
void SetTexture (const Texture *texture)
 Sets the geometry's texture. More...
 
void Release (bool clear_buffers=false)
 

Detailed Description

A helper object for holding an array of vertices and indices, and compiling it as necessary when rendered.

Author
Peter Curry

Constructor & Destructor Documentation

Rocket::Core::Geometry::Geometry ( Element *  host_element = NULL)
Rocket::Core::Geometry::Geometry ( Context *  host_context)
Rocket::Core::Geometry::~Geometry ( )

Member Function Documentation

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.
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.
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_buffersTrue to also clear the vertex and index buffers, false to leave intact.
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]translationThe translation of the geometry.
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_elementThe new host element for the geometry.
void Rocket::Core::Geometry::SetTexture ( const Texture *  texture)

Sets the geometry's texture.


The documentation for this class was generated from the following file: