-
Notifications
You must be signed in to change notification settings - Fork 0
/
ThreeDModel.h
54 lines (38 loc) · 868 Bytes
/
ThreeDModel.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
#pragma once
/*
This is a ThreeDModel system.
*/
#include "BaseSystem.h"
#include <shared/defs.h>
#include <util/util.h>
#include "animTcl.h"
#include <GLmodel/GLmodel.h>
#include "shared/opengl.h"
#include <vector>
#include <glm/vec3.hpp>
#include <glm/mat4x4.hpp>
#include <glm/glm.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtc/matrix_transform.hpp>
// ThreeDModel system
class ThreeDModel : public BaseSystem
{
public:
ThreeDModel(const std::string& name);
void reset(double time);
void display(GLenum mode = GL_RENDER);
// Position vector
glm::vec3 position;
// Distance travelled
float distanceTravelled;
// Velocity
float velocity;
// Orientation UVW
glm::vec3 u;
glm::vec3 w;
glm::vec3 v;
// Transform matrix
glm::mat4 transform;
protected:
GLMmodel m_model;
};