-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobject.h
More file actions
42 lines (32 loc) · 779 Bytes
/
object.h
File metadata and controls
42 lines (32 loc) · 779 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
#ifndef OBJECT_H
#define OBJECT_H
#include <string>
#include <vector>
#include <map>
#include <array>
#include "components/transform.h"
#include "components/model.h"
class Object
{
protected:
std::string tag;
std::vector<Object*> childs;
Object* parent;
Object* findRecursively(std::string tag, Object* obj);
public:
Object* rootObject;
Transform* transform;
Model* model;
std::map<std::string, Component*> components;
Object();
~Object();
bool setTag(std::string tag);
std::string getTag();
bool setParent(Object* obj);
Object* getParent();
void addChild(Object* child);
void removeChild(Object* child);
Object* getChildByTag(std::string);
std::vector<Object*> getChilds();
};
#endif // OBJECT_H