-
Notifications
You must be signed in to change notification settings - Fork 1
/
misc.h
76 lines (49 loc) · 1.71 KB
/
misc.h
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef MISC_H
#define MISC_H
#include <QString>
#include <QDebug>
#include <iostream>
#include <math.h>
#include <GLUT/glut.h>
// draw the table lamp may result in slack
#define TABLELAMP 0
#define LIGHT_COUNT 2
#define TEST 1
#define DEBUG(MESSAGE) {if(TEST){std::cout<<MESSAGE<<std::endl;}}
#define DEBUGS(MESSAGE) {if(TEST){std::cout<<MESSAGE;}}
//==========================================
// File path definition
// You may need to change this to compile
#define TEXTUREROOT "/Users/ying/Documents/DEV/qt_prj/gl/images"
#define CRACK (QString(TEXTUREROOT)+QString("/Crack.bmp")).toStdString().c_str()
#define SPOT (QString(TEXTUREROOT)+QString("/Spot.bmp")).toStdString().c_str()
#define MONET (QString(TEXTUREROOT)+QString("/Monet.bmp")).toStdString().c_str()
#define NIGHTSKY (QString(TEXTUREROOT)+QString("/starskyrecur.bmp")).toStdString().c_str()
#define BALCONY (QString(TEXTUREROOT)+QString("/balcony.bmp")).toStdString().c_str()
#define CUBE (QString(TEXTUREROOT)+QString("/texcube.bmp")).toStdString().c_str()
#define IMAX (QString(TEXTUREROOT)+QString("/teximax/")).toStdString().c_str()
#define IMAXFRAME 470
#define POLL (QString(TEXTUREROOT)+QString("/texpoll/")).toStdString().c_str()
#define POLLCOUNT 6
#define OBJ_FILE_GIRL (QString(TEXTUREROOT)+QString("/girl.obj")).toStdString().c_str()
//==========================================
#define PI 3.1415926
struct Point3f{
GLfloat x;
GLfloat y;
GLfloat z;
};
struct Dimension3f{
GLfloat length;
GLfloat width;
GLfloat height;
};
enum LightParam{
Ambient = 0,
Diffuse = 1,
Specular = 2,
Position = 3
};
// override the glutSolidCube() function in GLUT library
void glutSolidCube(GLdouble size);
#endif // MISC_H