Rocket::Core::GeometryUtilities Class Reference

#include <GeometryUtilities.h>


Static Public Member Functions

static void GenerateQuad (Vertex *vertices, int *indices, const Vector2f &origin, const Vector2f &dimensions, const Colourb &colour, int index_offset=0)
static void GenerateQuad (Vertex *vertices, int *indices, const Vector2f &origin, const Vector2f &dimensions, const Colourb &colour, const Vector2f &top_left_texcoord, const Vector2f &bottom_right_texcoord, int index_offset=0)

Detailed Description

A class containing helper functions for rendering geometry.

Author:
Robert Curry

Member Function Documentation

void Rocket::Core::GeometryUtilities::GenerateQuad ( Vertex vertices,
int *  indices,
const Vector2f origin,
const Vector2f dimensions,
const Colourb colour,
int  index_offset = 0 
) [static]

Generates a quad from a position, size and colour.

Parameters:
[out] vertices An array of at least four vertices that the generated vertex data will be written into.
[out] indices An array of at least six indices that the generated index data will be written into.
[in] origin The origin of the quad to generate.
[in] dimensions The dimensions of the quad to generate.
[in] colour The colour to be assigned to each of the quad's vertices.
[in] index_offset The offset to be added to the generated indices; this should be the number of vertices already in the array.

void Rocket::Core::GeometryUtilities::GenerateQuad ( Vertex vertices,
int *  indices,
const Vector2f origin,
const Vector2f dimensions,
const Colourb colour,
const Vector2f top_left_texcoord,
const Vector2f bottom_right_texcoord,
int  index_offset = 0 
) [static]

Generates a quad from a position, size, colour and texture coordinates.

Parameters:
[out] vertices An array of at least four vertices that the generated vertex data will be written into.
[out] indices An array of at least six indices that the generated index data will be written into.
[in] origin The origin of the quad to generate.
[in] dimensions The dimensions of the quad to generate.
[in] colour The colour to be assigned to each of the quad's vertices.
[in] top_left_texcoord The texture coordinates at the top-left of the quad.
[in] bottom_right_texcoord The texture coordinates at the bottom-right of the quad.
[in] index_offset The offset to be added to the generated indices; this should be the number of vertices already in the array.


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