This class rapresents a single Letter (or number or special character), with a list of textures that graphically rapresents the letter.
More...
#include <letter.h>
|
QList< int > | getRandomUniqueSequence (int from, int to, int cases) |
| It is a private utility method that returns a QList of random unique (if possible) integer numbers from an interval. More...
|
|
This class rapresents a single Letter (or number or special character), with a list of textures that graphically rapresents the letter.
In order to do this it stores the character in a QChar and a list GLuint that are the texture IDs.
- Version
- 1.0
- Author
- #34
Letter::Letter |
( |
QChar |
_letter | ) |
|
|
explicit |
Create a Letter that rapresents the character _letter.
- Parameters
-
_letter | is the character rapresented. |
GLvoid Letter::appendTexture |
( |
GLuint |
textureID | ) |
|
Appends a textures to the Letter's textures List.
- Parameters
-
textureID | is the texture ID to append to the Letter. |
QList< GLuint > Letter::getAllTextures |
( |
| ) |
|
Returns a QList of all the textures of the Letter.
- Returns
- a QList of all the textures of the Letter.
GLuint Letter::getRandomTexture |
( |
| ) |
|
Returns a random selected texture from the list of texture IDs of the Letter.
- Returns
- a random selected texture from the list of texture IDs of the Letter.
QList< GLuint > Letter::getRandomTextures |
( |
int |
numberOfTextures | ) |
|
Returns a QList of numberOfTextures random selected texture from the list of texture IDs of the Letter. If the Letter contains at least numberOfTextures textures, the textures doesn't repeat.
- Parameters
-
numberOfTextures | is the number of textures you want to extract. |
QList< int > Letter::getRandomUniqueSequence |
( |
int |
from, |
|
|
int |
to, |
|
|
int |
cases |
|
) |
| |
|
private |
It is a private utility method that returns a QList of random unique (if possible) integer numbers from an interval.
It is a smart function and completes its task in a deterministic cases-linear time.
- Parameters
-
from | is the lower bound of the interval. |
to | is the upper bound of the interval. |
cases | is the number of integer to select. |
- Returns
- a QList of random unique (if possible) integer numbers from an interval.
It is the character rapresented.
QList<GLuint> Letter::textures |
|
private |
It is the QList of the texture IDs associated to the Letter.
The documentation for this class was generated from the following files: