45 explicit Cube(
Level *_level,
Skin *_skin,
QObject *_parent = 0, QGLShaderProgram *_explosionShader = NULL);
111 void draw(GLboolean simplifyForPicking =
false);
Vector3f * anglesMatrix[4][4][4]
Definition: cube.h:136
void collided()
It is the slot invoked when the Cube collides with an Obstacle.
Definition: cube.cpp:287
QGLShaderProgram * explosionShader
Definition: cube.h:139
void draw(GLboolean simplifyForPicking=false)
Draw the Cube.
Definition: cube.cpp:125
void completed()
Actions to perform when the level is completed.
Definition: cube.cpp:269
GLint xCell
Definition: cube.h:134
GLint jumpStep
Definition: cube.h:131
QObject * parent
Definition: cube.h:122
GLint levelCellsWidth
Definition: cube.h:128
Vector3f * normalsMatrix[4][4][4]
Definition: cube.h:135
void drawExplosion()
this function is called in the draw function in case of explosion.
Definition: cube.cpp:233
GLfloat scaleFactor
Definition: cube.h:129
void jump()
Make the Cube jump.
Definition: cube.cpp:82
GLint explosionStep
Definition: cube.h:133
Skin * skin
Definition: cube.h:121
bool canMove
Definition: cube.h:138
void keyPressed(QKeyEvent *event)
Slot invoked when the user presses a key on the keyboard.
Definition: cube.cpp:296
It is the Skin Class.
Definition: skin.h:30
GLfloat gravity
Definition: cube.h:126
GLint startXCell
Definition: cube.h:137
void stopCube()
Stop the motion of the Cube.
Definition: cube.cpp:62
~Cube()
Safely destroy a Cube object.
Definition: cube.cpp:51
void explosionFinished()
Signal to inform that the explosion has finished.
void levelCompleted()
Signal emitted when the level is completed.
GLfloat speed
Definition: cube.h:125
GLint levelCellsLength
Definition: cube.h:127
void suicide()
Signal emitted when the player "suicide" the Cube.
Vector3f * position
Definition: cube.h:123
Structure that rapresents a Vector of float in a 3-D space.
Definition: vector3f.h:31
GLfloat jumpStartTime
Definition: cube.h:130
This class rapresents the player's Cube.
Definition: cube.h:31
void explode()
Make the Cube explode.
Definition: cube.cpp:264
unsigned char state
Definition: cube.h:124
void createNormalsMatrix()
Generate the normalsMatrix Matrix.
Definition: cube.cpp:211
bool isMoving()
Returns true if the Cube is moving, else false.
Definition: cube.cpp:94
void updatePosition()
Update the position of the Cube.
Definition: cube.cpp:167
void playEffect(QString effectName)
Signal emitted to play an effect.
This class rapresents a Level of Qubet, with its obstacle. It is able to draw itself simply using the...
Definition: level.h:33
void resetCube()
Reset the Level.
Definition: cube.cpp:275
void moveLeft()
Make the Cube move to the Left.
Definition: cube.cpp:99
void startCube()
Start the motion of the Cube;.
Definition: cube.cpp:57
GLint movingStep
Definition: cube.h:132
Vector3f * getPosition()
Returns the position of the Cube.
Definition: cube.cpp:67
void moveRight()
Make the Cube move to the right.
Definition: cube.cpp:112
GLfloat getZ()
Returns the Z of the Cube.
Definition: cube.cpp:72
void setPosition(Vector3f *_position)
Set the position of the Cube.
Definition: cube.cpp:77
void hideLevelName()
Signal to inform to hide the level name.
Cube(Level *_level, Skin *_skin, QObject *_parent=0, QGLShaderProgram *_explosionShader=NULL)
Create a Cube.
Definition: cube.cpp:23