From 8cb74178c2b8e5883a1181af687fa8cfc0c6e5da Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 18 Nov 2018 23:44:40 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95=E4=B8=BA=E5=B0=8F?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Math/je_transform.cpp | 99 ---------------------------------------- 1 file changed, 99 deletions(-) delete mode 100644 src/libjin/Math/je_transform.cpp (limited to 'src/libjin/Math/je_transform.cpp') diff --git a/src/libjin/Math/je_transform.cpp b/src/libjin/Math/je_transform.cpp deleted file mode 100644 index c0676cb..0000000 --- a/src/libjin/Math/je_transform.cpp +++ /dev/null @@ -1,99 +0,0 @@ -#include "je_transform.h" - -namespace JinEngine -{ - namespace Math - { - - Transform::Transform() - : mScale(1, 1) - , mPosition(0, 0) - , mOrigin(0, 0) - , mRotation(0) - { - } - - void Transform::set(float x, float y, float sx, float sy, float r, float ox, float oy) - { - setPosition(x, y); - setScale(sx, sy); - setRotation(r); - setOrigin(ox, oy); - } - - void Transform::setScale(float sx, float sy) - { - mScale.set(sx, sy); - } - - Vector2 Transform::getScale() const - { - return mScale; - } - - void Transform::scale(float sx, float sy) - { - mScale.x *= sx; - mScale.y *= sy; - } - - void Transform::setPosition(const Vector2& p) - { - setPosition(p.x, p.y); - } - - void Transform::setPosition(float x, float y) - { - mPosition.set(x, y); - } - - Vector2 Transform::getPosition() const - { - return mPosition; - } - - void Transform::move(float x, float y) - { - mPosition.x += x; - mPosition.y += y; - } - - void Transform::move(const Vector2& v) - { - move(v.x, v.y); - } - - void Transform::setOrigin(float x, float y) - { - mOrigin.set(x, y); - } - - Vector2 Transform::getOrigin() const - { - return mOrigin; - } - - void Transform::setRotation(float r) - { - mRotation = r; - } - - float Transform::getRotation() const - { - return mRotation; - } - - void Transform::rotate(float r) - { - mRotation += r; - } - - Matrix Transform::getMatrix() const - { - Matrix m; - m.setTransformation(mPosition.x, mPosition.y, mRotation, mScale.x, mScale.y, mOrigin.x, mOrigin.y); - return m; - } - - } -} \ No newline at end of file -- cgit v1.1-26-g67d0