-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glut_253.h
80 lines (62 loc) · 1.97 KB
/
glut_253.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
77
78
79
80
#ifndef GLUT_253_H
#define GLUT_253_H
#include "common_gl_common.h"
#include "engine_common.h"
#include "defines_11.h"
// GLUT routines
void engine_glut_253_reshape (int, int);
void engine_glut_253_key (unsigned char, int, int);
void engine_glut_253_key_special (int, int, int);
void engine_glut_253_menu (int);
void engine_glut_253_mouse_button (int, int, int, int);
void engine_glut_253_mouse_move (int, int);
void engine_glut_253_timer (int);
void engine_glut_253_draw (void);
void engine_glut_253_idle (void);
void engine_glut_253_visible (int);
class vox
{
public:
vox ()
: position ()
, free (true)
, slave (false)
, dimension ()
{}
vox (glm::i32vec3 pos)
: position (pos)
, free (true)
, slave (false)
, dimension (1, 1, 1)
{}
glm::i32vec3 position;
bool free;
bool slave;
glm::i32vec3 dimension;
};
struct Engine_OpenGL_GLUT_253_CBData
{
//
float a0;
bool flip;
vox voxGrid[ENGINE_GLUT_253_DEFAULT_DIMENSION_X * ENGINE_GLUT_253_DEFAULT_DIMENSION_Y * ENGINE_GLUT_253_DEFAULT_DIMENSION_Z];
// menu
bool wireframe;
// camera
struct Engine_GL_Camera camera;
// mouse
float angle;
float deltaAngle;
int xOrigin;
};
int index (int, int, int);
int maxIndex ();
bool validIndex (int, int, int);
float easeInOutQuint (float);
void createVoxWorld (struct Engine_OpenGL_GLUT_253_CBData&);
void drawFaceBox (int, int, int, Common_GL_Color_t&, Common_GL_Color_t&, Common_GL_Color_t&);
void drawVox (int, int, int, float, struct Engine_OpenGL_GLUT_253_CBData&);
bool areAllFree (glm::i32vec3, glm::i32vec3, struct Engine_OpenGL_GLUT_253_CBData&);
void claim (glm::i32vec3, glm::i32vec3, struct Engine_OpenGL_GLUT_253_CBData&);
void irregularSubDivide (struct Engine_OpenGL_GLUT_253_CBData&);
#endif // GLUT_253_H