summaryrefslogtreecommitdiffstats
path: root/MatchBloxEngine/MatchBloxEngine/C_3DObject.cpp
blob: a7482c74778e83a9b9ef5e8414790aa43d3fb206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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);
}