summaryrefslogtreecommitdiffstats
path: root/MatchBloxEngine/MatchBloxEngine/C_Box.h
diff options
context:
space:
mode:
authorDennis Peeten <dpeeten@onsneteindhoven.nl>2008-05-06 08:20:40 (GMT)
committerDennis Peeten <dpeeten@onsneteindhoven.nl>2008-05-06 08:20:40 (GMT)
commit90e452660d230c7dd181ee7c3fbc5b5a117ed937 (patch)
treea666b6f565a125f21a44c23e39fbb7d3d5412d3a /MatchBloxEngine/MatchBloxEngine/C_Box.h
parent0a92d39e9e8774d96a6277f51890ee6eb345b40b (diff)
download2iv55-90e452660d230c7dd181ee7c3fbc5b5a117ed937.zip
2iv55-90e452660d230c7dd181ee7c3fbc5b5a117ed937.tar.gz
2iv55-90e452660d230c7dd181ee7c3fbc5b5a117ed937.tar.bz2
Diffstat (limited to 'MatchBloxEngine/MatchBloxEngine/C_Box.h')
-rw-r--r--MatchBloxEngine/MatchBloxEngine/C_Box.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/MatchBloxEngine/MatchBloxEngine/C_Box.h b/MatchBloxEngine/MatchBloxEngine/C_Box.h
new file mode 100644
index 0000000..ed8c133
--- /dev/null
+++ b/MatchBloxEngine/MatchBloxEngine/C_Box.h
@@ -0,0 +1,35 @@
+#ifndef C_BOX_HEADER_FILE
+
+#define C_BOX_HEADER_FILE
+
+#include <GL/glut.h>
+#include "C_3DObject.h"
+
+class C_Box : public C_3DObject
+{
+public:
+ C_Box(const char *f_strFileName,
+ GLuint f_uiTexture,
+ MatProps_t f_Mat,
+ int f_iTilesX, int f_iTilesY,
+ C_3DObject *f_pTiles[5]);
+
+ ~C_Box();
+
+ void RandomizeTiles();
+ void Render();
+
+private:
+ C_3DObject **m_pTiles; //the tile objects for the top face of the box (holes)
+ int m_iTilesX, //number of tiles in x direction
+ m_iTilesY, //number of tiles in y direction
+ m_iNumTiles; //total number of tiles
+ double m_dTileSize; //the width and height of a tile
+ Vect3D_t m_LowLeftTilePos; //center position of the lower leftmost
+ //tile (relative to the box its position)
+
+ int *m_iTilesLayout; //the indices of the tile objects
+};
+
+#endif //C_BOX_HEADER_FILE
+