-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWall.h
39 lines (31 loc) · 800 Bytes
/
Wall.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
#pragma once
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <btBulletDynamicsCommon.h>
#include <iostream>
class Wall {
private:
glm::vec3 position;
float scale;
static unsigned int vao, vbo;
static unsigned int t_wall, t_start, t_finish, t_floor;
static bool generated, cleaned;
void generateModel();
void generateTextures();
public:
btRigidBody* body;
enum Type {
WALL,
START,
FINISH,
FLOOR
} type;
Wall(glm::vec3 pos, float sc, Type t, btDiscreteDynamicsWorld* world);
~Wall();
static void render();
static void bind();
static void unbind();
inline const glm::vec3& getPosition() const { return position; }
inline const float getScale() const { return scale; }
glm::mat4 getModelMatrix() const;
};