11218
|
1 #include
|
|
2
|
|
3 #include "lid1.h"
|
|
4 #include "lid2.h"
|
|
5 #include "lid3.h"
|
|
6 #include "lid4.h"
|
|
7 #include "lid5.h"
|
|
8 #include "lid6.h"
|
|
9 #include "lid8.h"
|
|
10 #include "lid9.h"
|
|
11 #include "lid10.h"
|
|
12
|
|
13 #define NUM_LIDS 9
|
|
14
|
|
15 GLint lidLists[NUM_LIDS];
|
|
16
|
|
17 void initLids(){
|
|
18 GLint test;
|
|
19 int i;
|
|
20
|
|
21 GLint[0]=Gen3DObjectListLid1();
|
|
22 GLint[1]=Gen3DObjectListLid2();
|
|
23 GLint[2]=Gen3DObjectListLid3();
|
|
24 GLint[3]=Gen3DObjectListLid4();
|
|
25 GLint[4]=Gen3DObjectListLid5();
|
|
26 GLint[5]=Gen3DObjectListLid6();
|
|
27 GLint[6]=Gen3DObjectListLid8();
|
|
28 GLint[7]=Gen3DObjectListLid9();
|
|
29 GLint[8]=Gen3DObjectListLid10();
|
|
30
|
|
31 };
|
|
32
|
|
33 void drawLids(int left, right) {
|
|
34 //draw left
|
|
35 GLfloat offset = .5;
|
|
36
|
|
37 glPushMatrix();
|
|
38 glTranslatef(offset, 0, 0);
|
|
39 glCallList(lidLists[left]);
|
|
40 glPopMatrix();
|
|
41
|
|
42 //draw right
|
|
43 glPushMatrix();
|
|
44 glTranslatef(-offset, 0, 0);
|
|
45 glScalef(-1, 1, 1);
|
|
46 glCallList(lidLists[right]);
|
|
47 glPopMatrix();
|
|
48 } |