#include <DefaultManager.h>
Public Member Functions | |
void | renderInfo (unsigned int canvasWidth, unsigned int canvasHeight) |
virtual void | resize (unsigned int width, unsigned int height) |
void | print () |
Static Public Member Functions | |
static float | obtainRandomFloat (float max=1.0, float min=0.0) |
Protected Member Functions | |
virtual void | initComponents () |
void | initTouchIndicators () |
unsigned long | pickComponent (unsigned int x, unsigned int y) |
unsigned long | pickContainer (unsigned int x, unsigned int y, unsigned long excludeComponentId) |
void | renderText (float x, float y, float z, const std::string &str) |
void DefaultManager::renderInfo | ( | unsigned int | canvasWidth, | |
unsigned int | canvasHeight | |||
) |
Renders additional information on top of the application canvas.
canvasWidth | the width of the screen. | |
canvasHeight | the height of the screen. |
void DefaultManager::resize | ( | unsigned int | width, | |
unsigned int | height | |||
) | [virtual] |
Resizes the display. Here, it only forwards the resizing to the root component. More specific actions should be taken by the subclasses.
width | the new width of the display. | |
height | the new height of the display. |
static float DefaultManager::obtainRandomFloat | ( | float | max = 1.0 , |
|
float | min = 0.0 | |||
) | [inline, static] |
Returns a pseudo-random float value inside the given interval.
max | the maximum value of the random value. | |
min | the minimum value of the random value. |
void DefaultManager::print | ( | ) |
Prints the components in this manager.
virtual void DefaultManager::initComponents | ( | ) | [inline, protected, virtual] |
Initializes the component collection by creating and adding application specific components.
void DefaultManager::initTouchIndicators | ( | ) | [protected] |
Initializes the list of touch indicators.
unsigned long DefaultManager::pickComponent | ( | unsigned int | x, | |
unsigned int | y | |||
) | [protected] |
Returns the id of the component at the given coordinates or zero if no component was picked.
x | the x-coordinate of the selection. | |
y | the y-coordinate of the selection. |
unsigned long DefaultManager::pickContainer | ( | unsigned int | x, | |
unsigned int | y, | |||
unsigned long | excludeComponentId | |||
) | [protected] |
Returns the id of the container component (i. e., a component that is not a leaf in the composition tree) at the given coordinates or zero if no component was picked.
x | the x-coordinate of the selection. | |
y | the y-coordinate of the selection. | |
excludeComponentId | the id of the component that should be excluded from the picking domain. |
void DefaultManager::renderText | ( | float | x, | |
float | y, | |||
float | z, | |||
const std::string & | str | |||
) | [protected] |
Renders a string of characters given a 3D position and a string object. It makes use of GLUT.
x | the x-coordinate where the text is to be written. | |
y | the y-coordinate where the text is to be written. | |
z | the z-coordinate where the text is to be written. | |
str | the string with the text that is to be written. |