This class rapresents the player's Cube.
More...
#include <cube.h>
This class rapresents the player's Cube.
- Version
- 1.0
- Author
- #34
Cube::Cube |
( |
Level * |
_level, |
|
|
Skin * |
_skin, |
|
|
QObject * |
_parent = 0 , |
|
|
QGLShaderProgram * |
_explosionShader = NULL |
|
) |
| |
|
explicit |
Create a Cube.
- Parameters
-
_level | is the Level in which the Cube lives. |
_skin | is the skin of the Cube. |
_parent | is the parent of the Cube. |
_explosionShader | is the shader for the explosion. |
void Cube::draw |
( |
GLboolean |
simplifyForPicking = false | ) |
|
Draw the Cube.
- Parameters
-
simplifyForPicking | [default = false] is used to draw a simplified scene used for the picking function. |
Returns the position of the Cube.
- Returns
- the position of the Cube.
Returns the Z of the Cube.
- Returns
- the Z of the Cube.
Returns true if the Cube is moving, else false.
- Returns
- true if the Cube is moving, else false.
void Cube::keyPressed |
( |
QKeyEvent * |
event | ) |
|
|
privateslot |
Slot invoked when the user presses a key on the keyboard.
- Parameters
-
void Cube::playEffect |
( |
QString |
effectName | ) |
|
|
signal |
Signal emitted to play an effect.
- Parameters
-
effectName | is the name of the effect to play. |
void Cube::setPosition |
( |
Vector3f * |
_position | ) |
|
Set the position of the Cube.
- Parameters
-
_position | is the position to set. |
It is the 3-dimensional matrix that contain the nomrs vector of each sub-cube in case of explosion.
States if the cube can move or not.
QGLShaderProgram* Cube::explosionShader |
|
private |
It is the explosion Shader.
GLint Cube::explosionStep |
|
private |
It is the current explosion step.
It is the gravity variable.
GLfloat Cube::jumpStartTime |
|
private |
It is the time the Cube has started the jump.
It is the parameter of the jump.
GLint Cube::levelCellsLength |
|
private |
It is the number of cells of the Level's length.
GLint Cube::levelCellsWidth |
|
private |
It is the number of cells of the Level's width.
It is the current moving step for to left and right.
It is the 3-dimensional matrix that contain the nomrs vector of each sub-cube in case of explosion.
It is the Parent of the Cube.
It is the Cube's current position.
GLfloat Cube::scaleFactor |
|
private |
It is the current speed of the Cube.
It is the starting x cell.
unsigned char Cube::state |
|
private |
It is the state of the cube.
It is the x cell the Cube is on.
The documentation for this class was generated from the following files: