53 lines
1.4 KiB
C
Raw Normal View History

2013-02-25 21:52:03 +01:00
/*---------------------------------------------------------------------------------
KubKraft
Copyright (C) 2012 Quent42340 <quent42340@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------------*/
2013-02-11 21:58:34 +01:00
#ifndef CUBE_H
#define CUBE_H
class Cube {
public:
2013-02-13 23:10:55 +01:00
Cube(int x, int y, int z, GLuint texture, Map *map);
2013-02-11 21:58:34 +01:00
~Cube() {}
2013-02-13 23:10:55 +01:00
void draw();
2013-02-11 21:58:34 +01:00
2013-02-25 21:52:03 +01:00
void setSelected(bool selected, s8 face) { m_selected = selected; m_selectedFace = face; };
2013-02-17 20:46:59 +01:00
int x() const { return m_x; }
int y() const { return m_y; }
int z() const { return m_z; }
2013-02-26 00:07:14 +01:00
bool selected() const { return m_selected; }
2013-02-25 21:52:03 +01:00
s8 selectedFace() const { return m_selectedFace; }
2013-02-11 21:58:34 +01:00
private:
2013-02-13 23:10:55 +01:00
int m_x;
int m_y;
int m_z;
2013-02-11 21:58:34 +01:00
GLuint m_texture;
Map *m_map;
2013-02-17 20:46:59 +01:00
bool m_selected;
2013-02-25 21:52:03 +01:00
s8 m_selectedFace;
2013-02-11 21:58:34 +01:00
};
#endif // CUBE_H