-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transform.hpp
38 lines (35 loc) · 1.11 KB
/
Transform.hpp
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
#ifndef LINEARCHEXT_TRANSFORM_HPP
#define LINEARCHEXT_TRANSFORM_HPP
#include "Vector2.hpp"
#include "Component.hpp"
#include <vector>
namespace LinearchExt{
class GameObject;
enum Space{localSpace, worldSpace};
class Transform : public Component{
private:
Transform* parent;
public:
Vector2 localPosition;
double localRotation;
Vector2 localScale;
Transform();
~Transform();
Transform(GameObject*);
Transform* GetParent();
void SetParent(Transform*);
Vector2 WorldPosition();
double WorldRotation();
Vector2 WorldToLocalPoint(Vector2);
Vector2 LocalToWorldPoint(Vector2);
Vector2 WorldToLocalDirection(Vector2);
Vector2 LocalToWorldDirection(Vector2);
Vector2 WorldToLocalVector(Vector2);
Vector2 LocalToWorldVector(Vector2);
void RotateAround(double, Vector2, Space, bool);
Transform* GetRoot();
std::vector<Transform*> GetParentalVector();
std::vector<Transform*> GetParentalVector(std::vector<Transform*>);
};
}
#endif // TRANSFORM_HPP