Qubet  1.0
The ultimate QGL addicting videogame!
 All Classes Functions Variables Pages
skin.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 SKIN_H
20 #define SKIN_H
21 
22 #include <QtOpenGL>
23 
30 class Skin
31 {
32 
33 public:
34 
38  explicit Skin();
39 
43  explicit Skin(QString _name);
44 
55  explicit Skin(GLuint _x_plus, GLuint _x_minus, GLuint _y_plus, GLuint _y_minus, GLuint _z_plus, GLuint _z_minus);
56 
62  explicit Skin(GLuint texture);
63 
67  ~Skin();
68 
74  void setName(QString _name);
75 
81  QString getName();
82 
88  void setComment(QString _comment);
89 
95  QString getComment();
96 
103  void setTexture(GLuint face, GLuint textureID);
104 
112  GLuint getTexture(GLuint face);
113 
119  void setTextureXPlus(GLuint _x_plus);
120 
127  GLuint getTextureXPlus();
128 
134  void setTextureXMinus(GLuint _x_minus);
135 
141  GLuint getTextureXMinus();
142 
148  void setTextureYPlus(GLuint _y_plus);
149 
155  GLuint getTextureYPlus();
156 
162  void setTextureYMinus(GLuint _y_minus);
163 
169  GLuint getTextureYMinus();
170 
176  void setTextureZPlus(GLuint _z_plus);
177 
183  GLuint getTextureZPlus();
184 
190  void setTextureZMinus(GLuint _z_minus);
191 
197  GLuint getTextureZMinus();
198 
204  void setTextureForAllFaces(GLuint all);
205 
211  QString toString();
212 
213 
214 private:
215 
216  QString name;
217  QString comment;
218  GLuint x_plus;
219  GLuint x_minus;
220  GLuint y_plus;
221  GLuint y_minus;
222  GLuint z_plus;
223  GLuint z_minus;
225 };
226 
227 #endif // SKIN_H
void setName(QString _name)
Set the name of the Skin.
Definition: skin.cpp:69
QString name
Definition: skin.h:216
void setComment(QString _comment)
Set the comment of the Skin.
Definition: skin.cpp:79
GLuint x_minus
Definition: skin.h:219
QString getName()
Returns the name of the Skin.
Definition: skin.cpp:74
GLuint z_minus
Definition: skin.h:223
GLuint getTextureZPlus()
Returns the texture for z+ face.
Definition: skin.cpp:198
QString getComment()
Returns the comment of the Skin.
Definition: skin.cpp:84
void setTextureZPlus(GLuint _z_plus)
Set the texture for z+ face.
Definition: skin.cpp:193
It is the Skin Class.
Definition: skin.h:30
GLuint getTextureYMinus()
Returns the texture for y- face.
Definition: skin.cpp:188
~Skin()
Safely destroy the Skin.
Definition: skin.cpp:59
void setTextureForAllFaces(GLuint all)
Set the same texture for all the faces.
Definition: skin.cpp:213
void setTextureXPlus(GLuint _x_plus)
Set the texture for x+ face.
Definition: skin.cpp:153
Skin()
Create a Skin object.
Definition: skin.cpp:22
GLuint x_plus
Definition: skin.h:218
void setTextureZMinus(GLuint _z_minus)
Set the texture for z- face.
Definition: skin.cpp:203
GLuint getTexture(GLuint face)
Returns the texture for the specified face.
Definition: skin.cpp:119
GLuint y_minus
Definition: skin.h:221
void setTextureYMinus(GLuint _y_minus)
Set the texture for y- face.
Definition: skin.cpp:183
GLuint getTextureXMinus()
Returns the texture for x- face.
Definition: skin.cpp:168
QString toString()
Print a string containing the GLuint textureIDs.
Definition: skin.cpp:223
GLuint getTextureXPlus()
Returns the texture for x+ face.
Definition: skin.cpp:158
GLuint z_plus
Definition: skin.h:222
GLuint getTextureYPlus()
Returns the texture for y+ face.
Definition: skin.cpp:178
void setTextureYPlus(GLuint _y_plus)
Set the texture for y+ face.
Definition: skin.cpp:173
GLuint getTextureZMinus()
Returns the texture for z- face.
Definition: skin.cpp:208
QString comment
Definition: skin.h:217
void setTexture(GLuint face, GLuint textureID)
Set one texture of the Skin.
Definition: skin.cpp:89
GLuint y_plus
Definition: skin.h:220
void setTextureXMinus(GLuint _x_minus)
Set the texture for x- face.
Definition: skin.cpp:163