blob: 54c1837c48e186d0722829347068b78b53c02147 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include <GL\glut.h>
#include "C_Hand.h"
#define FADE_DURATION 500
C_Hand::C_Hand(char* f_strFileName)
: C_3DObject(f_strFileName), m_CurrState(IDLE), m_uiAnimStart(0)
{
}
void C_Hand::Draw(unsigned int f_iElapsedTime)
{
unsigned int l_uiDeltaTime = f_iElapsedTime - m_uiAnimStart;
if (l_uiDeltaTime > g_HandAnimDurations[(int)m_CurrState])
{
m_CurrState = IDLE;
}
glPushMatrix();
TransRotateScale();
switch (m_CurrState)
{
case GRAB:
C_3DObject::Draw();
break;
case RELEASE:
C_3DObject::Draw();
break;
case IDLE:
default:
C_3DObject::Draw();
break;
}
glPopMatrix();
}
|