summaryrefslogtreecommitdiffstats
path: root/MatchBloxEngine/MatchBloxEngine/C_3DObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'MatchBloxEngine/MatchBloxEngine/C_3DObject.cpp')
-rw-r--r--MatchBloxEngine/MatchBloxEngine/C_3DObject.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/MatchBloxEngine/MatchBloxEngine/C_3DObject.cpp b/MatchBloxEngine/MatchBloxEngine/C_3DObject.cpp
new file mode 100644
index 0000000..a7482c7
--- /dev/null
+++ b/MatchBloxEngine/MatchBloxEngine/C_3DObject.cpp
@@ -0,0 +1,28 @@
+#include <GL/glut.h>
+#include "C_3DObject.h"
+
+
+C_3DObject::C_3DObject(char* f_strFileName)
+{
+ //init position rotation and scale
+ m_d3Pos[0] = m_d3Pos[1] = m_d3Pos[2] = 0.0;
+ m_d3Rot[0] = m_d3Rot[1] = m_d3Rot[2] = 0.0;
+ m_d3Scale[0] = m_d3Scale[1] = m_d3Scale[2] = 1.0;
+
+ //load 3d model
+ //Load(f_strFileName);
+}
+
+void C_3DObject::TransRotateScale()
+{
+ glRotated(m_d3Rot[2], 0.0, 0.0, 1.0);
+ glRotated(m_d3Rot[0], 1.0, 0.0, 0.0);
+ glRotated(m_d3Rot[1], 0.0, 1.0, 0.0);
+ glTranslated(m_d3Pos[0], m_d3Pos[1], m_d3Pos[2]);
+ glScaled(m_d3Scale[0], m_d3Scale[1], m_d3Scale[2]);
+}
+
+void C_3DObject::Draw()
+{
+ glutSolidCube(1.0);
+} \ No newline at end of file