Qubet  1.0
The ultimate QGL addicting videogame!
 All Classes Functions Variables Pages
Public Member Functions | Private Attributes | List of all members
Alphabet Class Reference

This class is used to keep a list of Letter (from this the name Alphabet) It provide access to Letter function such as appending textures to a Letter and getting textures from a Letter. More...

#include <alphabet.h>

Collaboration diagram for Alphabet:
Collaboration graph

Public Member Functions

 Alphabet ()
 Creates an empty Alphabet and initializes the seed of random number generation used to extract a set of random Letter textures.
 
 ~Alphabet ()
 Safely destroy an Alphabet (and all the Letter in its list).
 
SkingetRandomLetterSkin (QChar letter)
 Returns a random generated Skin of the letter given as parameter. More...
 
GLuint getRandomLetterTexture (QChar letter)
 Returns a random texture of the letter given as parameter. More...
 
QList< GLuint > getRandomLetterTextures (QChar letter, GLint numberOfTextures)
 Returns a list of random textures of the letter given as parameter. More...
 
QList< GLuint > getAllLetterTextures (QChar letter)
 Returns a list of all the textures of the letter given as parameter. More...
 
GLvoid appendLetterTexture (QChar letter, GLuint textureID)
 Appends the textureID given as parameter to the Letter's textures of the letter given as parameter. More...
 

Private Attributes

QMap< QChar, Letter * > lettersList
 

Detailed Description

This class is used to keep a list of Letter (from this the name Alphabet) It provide access to Letter function such as appending textures to a Letter and getting textures from a Letter.

Version
1.0
Author
#34

Member Function Documentation

GLvoid Alphabet::appendLetterTexture ( QChar  letter,
GLuint  textureID 
)

Appends the textureID given as parameter to the Letter's textures of the letter given as parameter.

Parameters
letteris the letter to which you want to append the textureID.
textureIDis the texture ID to append.

Here is the caller graph for this function:

QList< GLuint > Alphabet::getAllLetterTextures ( QChar  letter)

Returns a list of all the textures of the letter given as parameter.

If the letter is not present in the Alphabet or contains no textures, the function will return an empty list.

Parameters
letteris the QChar letter of the Alphabet you want to extract textures.
Returns
the list of all letter's Texture IDs.
Skin * Alphabet::getRandomLetterSkin ( QChar  letter)

Returns a random generated Skin of the letter given as parameter.

If the letter has got at least 6 textures, the skin faces are not repeated, else they are choosen in a completely random way.

If the letter is not present in the Alphabet or contains no textures, the function will return a Skin of zeros.

Parameters
letteris the QChar letter of the Alphabet you want to generate the skin.
Returns
a random skin of parameter letter textures.

Here is the call graph for this function:

Here is the caller graph for this function:

GLuint Alphabet::getRandomLetterTexture ( QChar  letter)

Returns a random texture of the letter given as parameter.

If the letter is not present in the Alphabet or contains no textures, the function will return 0.

Parameters
letteris the letter you want a texture.
Returns
the random extracted texture ID.
QList< GLuint > Alphabet::getRandomLetterTextures ( QChar  letter,
GLint  numberOfTextures 
)

Returns a list of random textures of the letter given as parameter.

If the letter has got at least numberOfTextures textures, the skin faces are not repeated, else they are choosen in a completely random way.

If the letter is not present in the Alphabet or contains no textures, the function will return a list of zeros.

Parameters
letteris the QChar letter of the Alphabet you want to extract textures.
numberOfTexturesis the number of textures you want to extract from the Letter.
Returns
the random extracted list of texture IDs.

Member Data Documentation

QMap<QChar,Letter*> Alphabet::lettersList
private

It is the QMap of Letter* that compose the Alphabet.


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