-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMachineGun.cpp
More file actions
62 lines (49 loc) · 1.45 KB
/
MachineGun.cpp
File metadata and controls
62 lines (49 loc) · 1.45 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "stdafx.h"
#include "MachineGun.h"
//---------------------------------------------------------------------
//---------------------------------------------------------------------
GLUquadricObj *qobjmg;
void MachineGun::init()
{
qobjmg = gluNewQuadric();
MachineGunList = glGenLists(2);
glNewList(MachineGunList, GL_COMPILE);
// .50 CAL
glColor3f(0.0, 0.0, 0.0);
glPushMatrix();
glRotatef(180.0, 0.0, 1.0, 0.0);
glTranslatef(0.0, 0.0, -0.5);
gluCylinder(qobjmg, 0.08, 0.08, 2.5, 10.0, 10.0);
glPopMatrix();
glPushMatrix();
glRotatef(180.0, 0.0, 1.0, 0.0);
glTranslatef(0, 0.0, -0.5);
gluCylinder(qobjmg, 0.15, 0.15, 1.0, 10.0, 10.0);
glPopMatrix();
glPushMatrix();
glTranslatef(0.0, 0.0, 0.5);
gluDisk(qobjmg, 0.0, 0.15, 10.0, 10.0);
glPopMatrix();
glPushMatrix();
glRotatef(180, 0.0, 1.0, 0.0);
glTranslatef(0.0, 0.0, 0.5);
gluDisk(qobjmg, 0.0, 0.15, 10.0, 10.0);
glPopMatrix();
glPushMatrix();
glRotatef(180, 0.0, 1.0, 0.0);
glTranslatef(0.0, 0.0, 2.0);
gluDisk(qobjmg, 0.0, 0.08, 10.0, 10.0);
glPopMatrix();
glEndList();
} // end init
//---------------------------------------------------------------------
// Method:
// Function:
// Parameters:
// Returns:
// Called By:
// Calls:
//---------------------------------------------------------------------
void MachineGun::draw(){
glCallList(MachineGunList);
} // end draw