diff options
Diffstat (limited to 'src/libjin/Math/je_transform.h')
-rw-r--r-- | src/libjin/Math/je_transform.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/libjin/Math/je_transform.h b/src/libjin/Math/je_transform.h new file mode 100644 index 0000000..cb1f0ee --- /dev/null +++ b/src/libjin/Math/je_transform.h @@ -0,0 +1,49 @@ +#ifndef __JE_TRANSFORM_H__ +#define __JE_TRANSFORM_H__ + +#include "je_matrix.h" +#include "je_vector2.hpp" + +namespace JinEngine +{ + namespace Math + { + + class Transform + { + public: + Transform(); + + void set(float x, float y, float sx, float sy, float r, float ox, float oy); + + void setScale(float sx, float sy); + Vector2<float> getScale() const; + void scale(float sx, float sy); + + void setPosition(float x, float y); + void setPosition(const Vector2<float>& p); + Vector2<float> getPosition() const; + void move(float x, float y); + void move(const Vector2<float>& v); + + void setOrigin(float x, float y); + Vector2<float> getOrigin() const; + + void setRotation(float r); + float getRotation() const; + void rotate(float r); + + Matrix getMatrix() const; + + private: + Vector2<float> mScale; + Vector2<float> mPosition; + Vector2<float> mOrigin; + float mRotation; + + }; + + } +} + +#endif
\ No newline at end of file |