-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcube.h
More file actions
60 lines (27 loc) · 807 Bytes
/
Copy pathcube.h
File metadata and controls
60 lines (27 loc) · 807 Bytes
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
#ifndef CUBE_H
#define CUBE_H
#include <vector>
#include "graphics_headers.h"
#include "object.h"
// Derived class
class Cube : public Object {
public:
Cube();
~Cube();
void Initialize(GLint posAttribLoc, GLint colAttribLoc);
void Update(unsigned int dt);
void Render(GLint posAttribLoc, GLint colAttribLoc);
void createVertices();
glm::mat4 GetModel();
void setSpeed(glm::vec3 spd) { cube_m_speed = spd; }
private:
glm::mat4 cube_model;
std::vector<Vertex> cube_vertices;
std::vector<unsigned int> cube_indices;
GLuint cube_vao;
GLuint cube_VB;
GLuint cube_IB;
glm::vec3 cube_m_speed = glm::vec3(0., 0., 0.);
float angle;
};
#endif /* CUBE_H */