Qubet  1.0
The ultimate QGL addicting videogame!
 All Classes Functions Variables Pages
obstacle.h
1 // Qubet - Copyright (C) 2011
2 // Enrico Bacis
3 // Daniele Ciriello
4 
5 // Qubet is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 
19 #ifndef OBSTACLE_H
20 #define OBSTACLE_H
21 
22 #include "utilities.h"
23 
30 class Obstacle
31 {
32 
33 public:
34 
41  explicit Obstacle(GLint _modelId, Vector3f *_cell);
42 
46  ~Obstacle();
47 
53  GLvoid draw(GLboolean simplifyForPicking);
54 
60  GLint getId();
61 
67  GLvoid setId(GLint _id);
68 
74  GLvoid setCell(Vector3f *_cell);
75 
81  Vector3f *getCell();
82 
89 
95  GLvoid setColor(QColor _color);
96 
102  QColor getColor();
103 
109  GLvoid setModelId(GLint _modelId);
110 
116  GLint getModelId();
117 
123  GLvoid setType(GLint _type);
124 
130  GLint getType();
131 
132 
133 private:
134 
135  GLint id;
138  QColor color;
139  GLint modelId;
140  GLint type;
142 };
143 
144 #endif // OBSTACLE_H
GLvoid draw(GLboolean simplifyForPicking)
draw function for Obstacle Object.
Definition: obstacle.cpp:31
Obstacle(GLint _modelId, Vector3f *_cell)
Constructor of Obstacle.
Definition: obstacle.cpp:22
Vector3f * getCell()
Returns the cell of the Obstacle.
Definition: obstacle.cpp:66
GLint type
Definition: obstacle.h:140
GLvoid setColor(QColor _color)
Set the obstacle color.
Definition: obstacle.cpp:76
GLint getId()
This method return the obstacleId.
Definition: obstacle.cpp:50
GLvoid setId(GLint _id)
Set the obstacleId.
Definition: obstacle.cpp:55
QColor getColor()
Returns the obstacle color.
Definition: obstacle.cpp:81
QColor color
Definition: obstacle.h:138
Vector3f * position
Definition: obstacle.h:136
Vector3f * cell
Definition: obstacle.h:137
GLint id
Definition: obstacle.h:135
Structure that rapresents a Vector of float in a 3-D space.
Definition: vector3f.h:31
GLvoid setType(GLint _type)
Set the obstacle type.
Definition: obstacle.cpp:96
~Obstacle()
Safely destroy an Obstacle object.
Definition: obstacle.cpp:28
GLint getType()
Returns the obstacle type.
Definition: obstacle.cpp:101
GLint modelId
Definition: obstacle.h:139
This class rapresents an Obstacle.
Definition: obstacle.h:30
Vector3f * getPosition()
Returns the obstacle position.
Definition: obstacle.cpp:71
GLint getModelId()
Returns the obstacle modelId.
Definition: obstacle.cpp:91
GLvoid setModelId(GLint _modelId)
Set the obstacle modelId.
Definition: obstacle.cpp:86
GLvoid setCell(Vector3f *_cell)
Set the cell of the Obstacle.
Definition: obstacle.cpp:60