-
Notifications
You must be signed in to change notification settings - Fork 0
/
cubestacular.h
61 lines (52 loc) · 1.07 KB
/
cubestacular.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
#ifndef Cubestacular_H
#define Cubestacular_H
#include <OpenGL/gl3.h>
#include <GLFW/glfw3.h>
#include <stdlib.h>
// #include "massIncludes.h"
#include "camera.h"
#include "cube.h"
#include "shaderCreator.h"
#include "light.h"
#include "object.h"
#include "collisionPlane.h"
#include "cubeLauncher.h"
#include "projectile.h"
class Cubestacular
{
private:
ShaderCreator shaderCreator;
CubeLauncher launcher;
int children;
double lastTime;
double elapsedTime;
double timeStep;
public:
Cubestacular();
Cube cubeGeometry;
std::vector<Object> targets;
CollisionPlane collisionPlane;
Camera camera;
Light light;
GLuint shaderProgram;
GLuint cubeBufferId;
GLuint cubeVAOId;
void draw();
void stepSim();
//init
void initGL();
void initBuffers();
void initShaders();
//get/set
void setLastTime(double now);
double getLastTime();
void increaseElapsed(double step);
double getElapsed();
void resetElapsed();
double getTimeStep();
//UI
void handleMouseDown(double xpos, double ypos);
void handleWindowResize(int width, int height);
void handleKeyPress();
};
#endif