Qubet  1.0
The ultimate QGL addicting videogame!
 All Classes Functions Variables Pages
utilities.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 UTILITIES_H
20 #define UTILITIES_H
21 
22 #include "alphabet.h"
23 #include "vector3f.h"
24 #include <GL/glu.h>
25 
34 GLvoid drawRectangle(GLfloat x, GLfloat y, GLuint texture = 0, bool repeat = false);
35 
46 GLvoid drawPrism(GLfloat x, GLfloat y, GLfloat z, Skin *skin = NULL, bool invertBackTexture = false, bool repeat = false);
47 
53 GLvoid setTextureRepeat(bool repeat);
54 
60 GLvoid drawObstacle(GLuint id);
61 
70 Vector3f *getModelViewPos(Vector3f *vect, bool computeZDepth = false);
71 
79 Vector3f *getProjectionPos(Vector3f *vect);
80 
90 Vector3f *getPointFromParametricLine(Vector3f *p0, Vector3f *p1, GLfloat t);
91 
99 Vector3f *getObstacleBoundingBox(GLuint id);
100 
106 GLvoid setMaterialColor(int color);
107 
113 GLvoid setMaterialColor(QColor color);
114 
123 Vector3f *obstacleCellToPosition(Vector3f *cell, GLuint obstacleModelId);
124 
133 Vector3f *obstaclePositionToCell(Vector3f *position, GLuint obstacleModelId);
134 
135 #endif // UTILITIES_H
It is the Skin Class.
Definition: skin.h:30
Structure that rapresents a Vector of float in a 3-D space.
Definition: vector3f.h:31