-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathObject.h
More file actions
44 lines (35 loc) · 729 Bytes
/
Object.h
File metadata and controls
44 lines (35 loc) · 729 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
#ifndef OBJECT_H
#define OBJECT_H
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <vector>
#include <algorithm>
#include "vmath.h"
#include "Mesh.h"
using namespace vmath;
using namespace std;
class Object
{
private:
vec3 position;
mat4 rotation;
Mesh* mesh;
vector<Object*> children;
Object* parent;
public:
Object(Mesh* mesh, vec3 position, mat4 roration);
~Object();
void render(mat4 model);
void setParent(Object* parent);
void addChild(Object* child);
void unsetParent();
void removeChild(Object* child);
vector<Object*> getChildren();
vec3 getPosition();
mat4 getRotation();
void setPosition(vec3 position);
void setRotation(mat4 rotation);
Mesh* getMesh();
};
//TODO: Objects Tree
#endif