Browse Source

Add 2D suffix to 2D transform functions, now please use SetPosition2D etc.

Aster@中国上海 11 years ago
parent
commit
fae8e81d54

+ 18 - 27
Source/Engine/LuaScript/pkgs/Scene/Node.pkg

@@ -26,49 +26,47 @@ class Node : public Animatable
     void SetName(const String name);
     void SetName(const String name);
     
     
     void SetPosition(const Vector3& position);
     void SetPosition(const Vector3& position);
-    void SetPosition(const Vector2& position);
     void SetPosition2D(const Vector2& position);
     void SetPosition2D(const Vector2& position);
+    void SetPosition2D(float x, float y);
     void SetRotation(const Quaternion& rotation);
     void SetRotation(const Quaternion& rotation);
-    void SetRotation(float rotation);
     void SetRotation2D(float rotation);
     void SetRotation2D(float rotation);
     void SetDirection(const Vector3& direction);
     void SetDirection(const Vector3& direction);
     void SetScale(float scale);
     void SetScale(float scale);
     void SetScale(const Vector3& scale);
     void SetScale(const Vector3& scale);
-    void SetScale(const Vector2& scale);
     void SetScale2D(const Vector2& scale);
     void SetScale2D(const Vector2& scale);
+    void SetScale2D(float x, float y);
 
 
     void SetTransform(const Vector3& position, const Quaternion& rotation);
     void SetTransform(const Vector3& position, const Quaternion& rotation);
-    void SetTransform(const Vector2& position, float rotation);
-    void SetTransform(const Vector3& position, const Quaternion& rotation, float scale);
-    void SetTransform(const Vector2& position, float rotation, float scale);
     void SetTransform(const Vector3& position, const Quaternion& rotation, const Vector3& scale);
     void SetTransform(const Vector3& position, const Quaternion& rotation, const Vector3& scale);
-    void SetTransform(const Vector2& position, float rotation, const Vector2& scale);
+    void SetTransform(const Vector3& position, const Quaternion& rotation, float scale);
+    void SetTransform2D(const Vector2& position, float rotation);
+    void SetTransform2D(const Vector2& position, float rotation, const Vector2& scale);
+    void SetTransform2D(const Vector2& position, float rotation, float scale);
     
     
     void SetWorldPosition(const Vector3& position);
     void SetWorldPosition(const Vector3& position);
-    void SetWorldPosition(const Vector2& position);
     void SetWorldPosition2D(const Vector2& position);
     void SetWorldPosition2D(const Vector2& position);
+    void SetWorldPosition2D(float x, float y);
     void SetWorldRotation(const Quaternion& rotation);
     void SetWorldRotation(const Quaternion& rotation);
-    void SetWorldRotation(float rotation);
     void SetWorldRotation2D(float rotation);
     void SetWorldRotation2D(float rotation);
     void SetWorldDirection(const Vector3& direction);
     void SetWorldDirection(const Vector3& direction);
     void SetWorldScale(float scale);
     void SetWorldScale(float scale);
     void SetWorldScale(const Vector3& scale);
     void SetWorldScale(const Vector3& scale);
-    void SetWorldScale(const Vector2& scale);
     void SetWorldScale2D(const Vector2& scale);
     void SetWorldScale2D(const Vector2& scale);
+    void SetWorldScale2D(float x, float y);
 
 
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation);
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation);
-    void SetWorldTransform(const Vector2& position, float rotation);
-    void SetWorldTransform(const Vector3& position, const Quaternion& rotation, float scale);
-    void SetWorldTransform(const Vector2& position, float rotation, float scale);
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation, const Vector3& scale);
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation, const Vector3& scale);
-    void SetWorldTransform(const Vector2& position, float rotation, const Vector3& scale);
+    void SetWorldTransform(const Vector3& position, const Quaternion& rotation, float scale);
+    void SetWorldTransform2D(const Vector2& position, float rotation);
+    void SetWorldTransform2D(const Vector2& position, float rotation, const Vector2& scale);
+    void SetWorldTransform2D(const Vector2& position, float rotation, float scale);
     
     
     void Translate(const Vector3& delta, TransformSpace space = TS_LOCAL);
     void Translate(const Vector3& delta, TransformSpace space = TS_LOCAL);
-    void Translate(const Vector2& delta, TransformSpace space = TS_LOCAL);
+    void Translate2D(const Vector2& delta, TransformSpace space = TS_LOCAL);
     void Rotate(const Quaternion& delta, TransformSpace space = TS_LOCAL);
     void Rotate(const Quaternion& delta, TransformSpace space = TS_LOCAL);
-    void Rotate(float delta, TransformSpace space = TS_LOCAL);
+    void Rotate2D(float delta, TransformSpace space = TS_LOCAL);
     void RotateAround(const Vector3& point, const Quaternion& delta, TransformSpace space = TS_LOCAL);
     void RotateAround(const Vector3& point, const Quaternion& delta, TransformSpace space = TS_LOCAL);
-    void RotateAround(const Vector2& point, float delta, TransformSpace space = TS_LOCAL);
+    void RotateAround2D(const Vector2& point, float delta, TransformSpace space = TS_LOCAL);
 
 
     void Pitch(float angle, TransformSpace space = TS_LOCAL);
     void Pitch(float angle, TransformSpace space = TS_LOCAL);
     void Yaw(float angle, TransformSpace space = TS_LOCAL);
     void Yaw(float angle, TransformSpace space = TS_LOCAL);
@@ -78,7 +76,7 @@ class Node : public Animatable
     
     
     void Scale(float scale);
     void Scale(float scale);
     void Scale(const Vector3& scale);
     void Scale(const Vector3& scale);
-    void Scale(const Vector2& scale);
+    void Scale2D(const Vector2& scale);
     
     
     void SetEnabled(bool enable);
     void SetEnabled(bool enable);
     void SetEnabled(bool enable, bool recursive);
     void SetEnabled(bool enable, bool recursive);
@@ -149,10 +147,10 @@ class Node : public Animatable
     const Matrix3x4& GetWorldTransform() const;
     const Matrix3x4& GetWorldTransform() const;
     Vector3 LocalToWorld(const Vector3& position) const;
     Vector3 LocalToWorld(const Vector3& position) const;
     Vector3 LocalToWorld(const Vector4& vector) const;
     Vector3 LocalToWorld(const Vector4& vector) const;
-    Vector2 LocalToWorld(const Vector2& vector) const;
+    Vector2 LocalToWorld2D(const Vector2& vector) const;
     Vector3 WorldToLocal(const Vector3& position) const;
     Vector3 WorldToLocal(const Vector3& position) const;
     Vector3 WorldToLocal(const Vector4& vector) const;
     Vector3 WorldToLocal(const Vector4& vector) const;
-    Vector2 WorldToLocal(const Vector2& vector) const;
+    Vector2 WorldToLocal2D(const Vector2& vector) const;
     bool IsDirty() const;
     bool IsDirty() const;
 
 
     unsigned GetNumChildren(bool recursive = false) const;
     unsigned GetNumChildren(bool recursive = false) const;
@@ -215,13 +213,6 @@ class Node : public Animatable
 };
 };
 
 
 ${
 ${
-#define SetPosition2D SetPosition
-#define SetRotation2D SetRotation
-#define SetScale2D SetScale
-#define SetWorldPosition2D SetWorldPosition
-#define SetWorldRotation2D SetWorldRotation
-#define SetWorldScale2D SetWorldScale
-
 #define TOLUA_DISABLE_tolua_SceneLuaAPI_Node_new00
 #define TOLUA_DISABLE_tolua_SceneLuaAPI_Node_new00
 static int tolua_SceneLuaAPI_Node_new00(lua_State* tolua_S)
 static int tolua_SceneLuaAPI_Node_new00(lua_State* tolua_S)
 {
 {

+ 2 - 2
Source/Engine/Scene/Node.cpp

@@ -931,7 +931,7 @@ Vector3 Node::LocalToWorld(const Vector4& vector) const
     return GetWorldTransform() * vector;
     return GetWorldTransform() * vector;
 }
 }
 
 
-Vector2 Node::LocalToWorld(const Vector2& vector) const
+Vector2 Node::LocalToWorld2D(const Vector2& vector) const
 {
 {
     Vector3 result = LocalToWorld(Vector3(vector));
     Vector3 result = LocalToWorld(Vector3(vector));
     return Vector2(result.x_, result.y_);
     return Vector2(result.x_, result.y_);
@@ -947,7 +947,7 @@ Vector3 Node::WorldToLocal(const Vector4& vector) const
     return GetWorldTransform().Inverse() * vector;
     return GetWorldTransform().Inverse() * vector;
 }
 }
 
 
-Vector2 Node::WorldToLocal(const Vector2& vector) const
+Vector2 Node::WorldToLocal2D(const Vector2& vector) const
 {
 {
     Vector3 result = WorldToLocal(Vector3(vector));
     Vector3 result = WorldToLocal(Vector3(vector));
     return Vector2(result.x_, result.y_);
     return Vector2(result.x_, result.y_);

+ 31 - 23
Source/Engine/Scene/Node.h

@@ -91,11 +91,13 @@ public:
     /// Set position in parent space. If the scene node is on the root level (is child of the scene itself), this is same as world space.
     /// Set position in parent space. If the scene node is on the root level (is child of the scene itself), this is same as world space.
     void SetPosition(const Vector3& position);
     void SetPosition(const Vector3& position);
     /// Set position in parent space (for Urho2D).
     /// Set position in parent space (for Urho2D).
-    void SetPosition(const Vector2& position) { SetPosition(Vector3(position)); }
+    void SetPosition2D(const Vector2& position) { SetPosition(Vector3(position)); }
+    /// Set position in parent space (for Urho2D).
+    void SetPosition2D(float x, float y) { SetPosition(Vector3(x, y, 0.0f)); }
     /// Set rotation in parent space.
     /// Set rotation in parent space.
     void SetRotation(const Quaternion& rotation);
     void SetRotation(const Quaternion& rotation);
     /// Set rotation in parent space (for Urho2D).
     /// Set rotation in parent space (for Urho2D).
-    void SetRotation(float rotation) { SetRotation(Quaternion(rotation)); }
+    void SetRotation2D(float rotation) { SetRotation(Quaternion(rotation)); }
     /// Set forward direction in parent space. Positive Z axis equals identity rotation.
     /// Set forward direction in parent space. Positive Z axis equals identity rotation.
     void SetDirection(const Vector3& direction);
     void SetDirection(const Vector3& direction);
     /// Set uniform scale in parent space.
     /// Set uniform scale in parent space.
@@ -103,27 +105,31 @@ public:
     /// Set scale in parent space.
     /// Set scale in parent space.
     void SetScale(const Vector3& scale);
     void SetScale(const Vector3& scale);
     /// Set scale in parent space (for Urho2D).
     /// Set scale in parent space (for Urho2D).
-    void SetScale(const Vector2& scale) { SetScale(Vector3(scale, 1.0f)); }
+    void SetScale2D(const Vector2& scale) { SetScale(Vector3(scale, 1.0f)); }
+    /// Set scale in parent space (for Urho2D).
+    void SetScale2D(float x, float y) { SetScale(Vector3(x, y, 1.0f)); }
     /// Set both position and rotation in parent space as an atomic operation. This is faster than setting position and rotation separately.
     /// Set both position and rotation in parent space as an atomic operation. This is faster than setting position and rotation separately.
     void SetTransform(const Vector3& position, const Quaternion& rotation);
     void SetTransform(const Vector3& position, const Quaternion& rotation);
-    /// Set both position and rotation in parent space as an atomic operation (for Urho2D).
-    void SetTransform(const Vector2& position, float rotation) { SetTransform(Vector3(position), Quaternion(rotation)); }
     /// Set both position, rotation and uniform scale in parent space as an atomic operation.
     /// Set both position, rotation and uniform scale in parent space as an atomic operation.
     void SetTransform(const Vector3& position, const Quaternion& rotation, float scale);
     void SetTransform(const Vector3& position, const Quaternion& rotation, float scale);
-    /// Set both position, rotation and uniform scale in parent space as an atomic operation (for Urho2D).
-    void SetTransform(const Vector2& position, float rotation, float scale) { SetTransform(Vector3(position), Quaternion(rotation), scale); }
     /// Set both position, rotation and scale in parent space as an atomic operation.
     /// Set both position, rotation and scale in parent space as an atomic operation.
     void SetTransform(const Vector3& position, const Quaternion& rotation, const Vector3& scale);
     void SetTransform(const Vector3& position, const Quaternion& rotation, const Vector3& scale);
+    /// Set both position and rotation in parent space as an atomic operation (for Urho2D).
+    void SetTransform2D(const Vector2& position, float rotation) { SetTransform(Vector3(position), Quaternion(rotation)); }
+    /// Set both position, rotation and uniform scale in parent space as an atomic operation (for Urho2D).
+    void SetTransform2D(const Vector2& position, float rotation, float scale) { SetTransform(Vector3(position), Quaternion(rotation), scale); }
     /// Set both position, rotation and scale in parent space as an atomic operation (for Urho2D).
     /// Set both position, rotation and scale in parent space as an atomic operation (for Urho2D).
-    void SetTransform(const Vector2& position, float rotation, const Vector2& scale)  { SetTransform(Vector3(position), Quaternion(rotation), Vector3(scale, 1.0f)); }
+    void SetTransform2D(const Vector2& position, float rotation, const Vector2& scale)  { SetTransform(Vector3(position), Quaternion(rotation), Vector3(scale, 1.0f)); }
     /// Set position in world space.
     /// Set position in world space.
     void SetWorldPosition(const Vector3& position);
     void SetWorldPosition(const Vector3& position);
     /// Set position in world space (for Urho2D).
     /// Set position in world space (for Urho2D).
-    void SetWorldPosition(const Vector2& position) { SetWorldPosition(Vector3(position)); }
+    void SetWorldPosition2D(const Vector2& position) { SetWorldPosition(Vector3(position)); }
+    /// Set position in world space (for Urho2D).
+    void SetWorldPosition2D(float x, float y) { SetWorldPosition(Vector3(x, y, 0.0f)); }
     /// Set rotation in world space.
     /// Set rotation in world space.
     void SetWorldRotation(const Quaternion& rotation);
     void SetWorldRotation(const Quaternion& rotation);
     /// Set rotation in world space (for Urho2D).
     /// Set rotation in world space (for Urho2D).
-    void SetWorldRotation(float rotation) { SetWorldRotation(Quaternion(rotation)); }
+    void SetWorldRotation2D(float rotation) { SetWorldRotation(Quaternion(rotation)); }
     /// Set forward direction in world space.
     /// Set forward direction in world space.
     void SetWorldDirection(const Vector3& direction);
     void SetWorldDirection(const Vector3& direction);
     /// Set uniform scale in world space.
     /// Set uniform scale in world space.
@@ -131,31 +137,33 @@ public:
     /// Set scale in world space.
     /// Set scale in world space.
     void SetWorldScale(const Vector3& scale);
     void SetWorldScale(const Vector3& scale);
     /// Set scale in world space (for Urho2D).
     /// Set scale in world space (for Urho2D).
-    void SetWorldScale(const Vector2& scale) { SetWorldScale(Vector3(scale, 1.0f)); }
+    void SetWorldScale2D(const Vector2& scale) { SetWorldScale(Vector3(scale, 1.0f)); }
+    /// Set scale in world space (for Urho2D).
+    void SetWorldScale2D(float x, float y) { SetWorldScale(Vector3(x, y, 1.0f)); }
     /// Set both position and rotation in world space as an atomic operation.
     /// Set both position and rotation in world space as an atomic operation.
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation);
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation);
-    /// Set both position and rotation in world space as an atomic operation (for Urho2D).
-    void SetWorldTransform(const Vector2& position, float rotation) { SetWorldTransform(Vector3(position), Quaternion(rotation)); }
     /// Set both position, rotation and uniform scale in world space as an atomic operation.
     /// Set both position, rotation and uniform scale in world space as an atomic operation.
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation, float scale);
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation, float scale);
-    /// Set both position, rotation and uniform scale in world space as an atomic operation (for Urho2D).
-    void SetWorldTransform(const Vector2& position, float rotation, float scale) { SetWorldTransform(Vector3(position), Quaternion(rotation), scale); }
     /// Set both position, rotation and scale in world space as an atomic opration.
     /// Set both position, rotation and scale in world space as an atomic opration.
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation, const Vector3& scale);
     void SetWorldTransform(const Vector3& position, const Quaternion& rotation, const Vector3& scale);
+    /// Set both position and rotation in world space as an atomic operation (for Urho2D).
+    void SetWorldTransform2D(const Vector2& position, float rotation) { SetWorldTransform(Vector3(position), Quaternion(rotation)); }
+    /// Set both position, rotation and uniform scale in world space as an atomic operation (for Urho2D).
+    void SetWorldTransform2D(const Vector2& position, float rotation, float scale) { SetWorldTransform(Vector3(position), Quaternion(rotation), scale); }
     /// Set both position, rotation and scale in world space as an atomic opration (for Urho2D).
     /// Set both position, rotation and scale in world space as an atomic opration (for Urho2D).
-    void SetWorldTransform(const Vector2& position, float rotation, const Vector2& scale) { SetWorldTransform(Vector3(position), Quaternion(rotation), Vector3(scale, 1.0f)); }
+    void SetWorldTransform2D(const Vector2& position, float rotation, const Vector2& scale) { SetWorldTransform(Vector3(position), Quaternion(rotation), Vector3(scale, 1.0f)); }
     /// Move the scene node in the chosen transform space.
     /// Move the scene node in the chosen transform space.
     void Translate(const Vector3& delta, TransformSpace space = TS_LOCAL);
     void Translate(const Vector3& delta, TransformSpace space = TS_LOCAL);
     /// Move the scene node in the chosen transform space (for Urho2D).
     /// Move the scene node in the chosen transform space (for Urho2D).
-    void Translate(const Vector2& delta, TransformSpace space = TS_LOCAL) { Translate(Vector3(delta), space); }
+    void Translate2D(const Vector2& delta, TransformSpace space = TS_LOCAL) { Translate(Vector3(delta), space); }
     /// Rotate the scene node in the chosen transform space.
     /// Rotate the scene node in the chosen transform space.
     void Rotate(const Quaternion& delta, TransformSpace space = TS_LOCAL);
     void Rotate(const Quaternion& delta, TransformSpace space = TS_LOCAL);
     /// Rotate the scene node in the chosen transform space (for Urho2D).
     /// Rotate the scene node in the chosen transform space (for Urho2D).
-    void Rotate(float delta, TransformSpace space = TS_LOCAL) { Rotate(Quaternion(delta), space); }
+    void Rotate2D(float delta, TransformSpace space = TS_LOCAL) { Rotate(Quaternion(delta), space); }
     /// Rotate around a point in the chosen transform space.
     /// Rotate around a point in the chosen transform space.
     void RotateAround(const Vector3& point, const Quaternion& delta, TransformSpace space = TS_LOCAL);
     void RotateAround(const Vector3& point, const Quaternion& delta, TransformSpace space = TS_LOCAL);
     /// Rotate around a point in the chosen transform space (for Urho2D).
     /// Rotate around a point in the chosen transform space (for Urho2D).
-    void RotateAround(const Vector2& point, float delta, TransformSpace space = TS_LOCAL) { RotateAround(Vector3(point), Quaternion(delta), space); }
+    void RotateAround2D(const Vector2& point, float delta, TransformSpace space = TS_LOCAL) { RotateAround(Vector3(point), Quaternion(delta), space); }
     /// Rotate around the X axis.
     /// Rotate around the X axis.
     void Pitch(float angle, TransformSpace space = TS_LOCAL);
     void Pitch(float angle, TransformSpace space = TS_LOCAL);
     /// Rotate around the Y axis.
     /// Rotate around the Y axis.
@@ -168,8 +176,8 @@ public:
     void Scale(float scale);
     void Scale(float scale);
     /// Modify scale in parent space.
     /// Modify scale in parent space.
     void Scale(const Vector3& scale);
     void Scale(const Vector3& scale);
-    /// Modify scale in parent space (for Urho3D).
-    void Scale(const Vector2& scale) { Scale(Vector3(scale, 1.0f)); }
+    /// Modify scale in parent space (for Urho2D).
+    void Scale2D(const Vector2& scale) { Scale(Vector3(scale, 1.0f)); }
     /// Set enabled/disabled state without recursion. Components in a disabled node become effectively disabled regardless of their own enable/disable state.
     /// Set enabled/disabled state without recursion. Components in a disabled node become effectively disabled regardless of their own enable/disable state.
     void SetEnabled(bool enable);
     void SetEnabled(bool enable);
     /// Set enabled/disabled state with optional recursion.
     /// Set enabled/disabled state with optional recursion.
@@ -347,13 +355,13 @@ public:
     /// Convert a local space position or rotation to world space.
     /// Convert a local space position or rotation to world space.
     Vector3 LocalToWorld(const Vector4& vector) const;
     Vector3 LocalToWorld(const Vector4& vector) const;
     /// Convert a local space position or rotation to world space (for Urho2D).
     /// Convert a local space position or rotation to world space (for Urho2D).
-    Vector2 LocalToWorld(const Vector2& vector) const;
+    Vector2 LocalToWorld2D(const Vector2& vector) const;
     /// Convert a world space position to local space.
     /// Convert a world space position to local space.
     Vector3 WorldToLocal(const Vector3& position) const;
     Vector3 WorldToLocal(const Vector3& position) const;
     /// Convert a world space position or rotation to local space.
     /// Convert a world space position or rotation to local space.
     Vector3 WorldToLocal(const Vector4& vector) const;
     Vector3 WorldToLocal(const Vector4& vector) const;
     /// Convert a world space position or rotation to local space (for Urho2D).
     /// Convert a world space position or rotation to local space (for Urho2D).
-    Vector2 WorldToLocal(const Vector2& vector) const;
+    Vector2 WorldToLocal2D(const Vector2& vector) const;
     /// Return whether transform has changed and world transform needs recalculation.
     /// Return whether transform has changed and world transform needs recalculation.
     bool IsDirty() const { return dirty_; }
     bool IsDirty() const { return dirty_; }
     /// Return number of child scene nodes.
     /// Return number of child scene nodes.

+ 22 - 20
Source/Engine/Script/APITemplates.h

@@ -597,32 +597,34 @@ template <class T> void RegisterNode(asIScriptEngine* engine, const char* classN
 {
 {
     RegisterAnimatable<T>(engine, className);
     RegisterAnimatable<T>(engine, className);
     RegisterSubclass<Node, T>(engine, "Node", className);
     RegisterSubclass<Node, T>(engine, "Node", className);
+	engine->RegisterObjectMethod(className, "void SetPosition2D(float, float)", asMETHODPR(T, SetPosition2D, (float, float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetScale(float)", asMETHODPR(T, SetScale, (float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetScale(float)", asMETHODPR(T, SetScale, (float), void), asCALL_THISCALL);
+	engine->RegisterObjectMethod(className, "void SetScale2D(float, float)", asMETHODPR(T, SetScale2D, (float, float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetTransform(const Vector3&in, const Quaternion&in)", asMETHODPR(T, SetTransform, (const Vector3&, const Quaternion&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetTransform(const Vector3&in, const Quaternion&in)", asMETHODPR(T, SetTransform, (const Vector3&, const Quaternion&), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void SetTransform(const Vector2&in, float)", asMETHODPR(T, SetTransform, (const Vector2&, float), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void SetTransform(const Vector3&in, const Quaternion&in, float)", asMETHODPR(T, SetTransform, (const Vector3&, const Quaternion&, float), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void SetTransform(const Vector2&in, float, float)", asMETHODPR(T, SetTransform, (const Vector2&, float, float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetTransform(const Vector3&in, const Quaternion&in, const Vector3&in)", asMETHODPR(T, SetTransform, (const Vector3&, const Quaternion&, const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetTransform(const Vector3&in, const Quaternion&in, const Vector3&in)", asMETHODPR(T, SetTransform, (const Vector3&, const Quaternion&, const Vector3&), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void SetTransform(const Vector2&in, float, const Vector2&in)", asMETHODPR(T, SetTransform, (const Vector2&, float, const Vector2&), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void SetTransform(const Vector3&in, const Quaternion&in, float)", asMETHODPR(T, SetTransform, (const Vector3&, const Quaternion&, float), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void SetTransform2D(const Vector2&in, float)", asMETHODPR(T, SetTransform2D, (const Vector2&, float), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void SetTransform2D(const Vector2&in, float, const Vector2&in)", asMETHODPR(T, SetTransform2D, (const Vector2&, float, const Vector2&), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void SetTransform2D(const Vector2&in, float, float)", asMETHODPR(T, SetTransform2D, (const Vector2&, float, float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetWorldTransform(const Vector3&in, const Quaternion&in)", asMETHODPR(T, SetWorldTransform, (const Vector3&, const Quaternion&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetWorldTransform(const Vector3&in, const Quaternion&in)", asMETHODPR(T, SetWorldTransform, (const Vector3&, const Quaternion&), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void SetWorldTransform(const Vector2&in, float)", asMETHODPR(T, SetWorldTransform, (const Vector2&, float), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void SetWorldTransform(const Vector3&in, const Quaternion&in, float)", asMETHODPR(T, SetWorldTransform, (const Vector3&, const Quaternion&, float), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void SetWorldTransform(const Vector2&in, float, float)", asMETHODPR(T, SetWorldTransform, (const Vector2&, float, float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetWorldTransform(const Vector3&in, const Quaternion&in, const Vector3&in)", asMETHODPR(T, SetWorldTransform, (const Vector3&, const Quaternion&, const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void SetWorldTransform(const Vector3&in, const Quaternion&in, const Vector3&in)", asMETHODPR(T, SetWorldTransform, (const Vector3&, const Quaternion&, const Vector3&), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void SetWorldTransform(const Vector2&in, float, const Vector2&in)", asMETHODPR(T, SetWorldTransform, (const Vector2&, float, const Vector2&), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void SetWorldTransform(const Vector3&in, const Quaternion&in, float)", asMETHODPR(T, SetWorldTransform, (const Vector3&, const Quaternion&, float), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void SetWorldTransform2D(const Vector2&in, float)", asMETHODPR(T, SetWorldTransform2D, (const Vector2&, float), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void SetWorldTransform2D(const Vector2&in, float, const Vector2&in)", asMETHODPR(T, SetWorldTransform2D, (const Vector2&, float, const Vector2&), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void SetWorldTransform2D(const Vector2&in, float, float)", asMETHODPR(T, SetWorldTransform2D, (const Vector2&, float, float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Translate(const Vector3&in, TransformSpace space = TS_LOCAL)", asMETHODPR(T, Translate, (const Vector3&, TransformSpace), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Translate(const Vector3&in, TransformSpace space = TS_LOCAL)", asMETHODPR(T, Translate, (const Vector3&, TransformSpace), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void Translate(const Vector2&in, TransformSpace space = TS_LOCAL)", asMETHODPR(T, Translate, (const Vector2&, TransformSpace), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void Translate2D(const Vector2&in, TransformSpace space = TS_LOCAL)", asMETHODPR(T, Translate2D, (const Vector2&, TransformSpace), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Rotate(const Quaternion&in, TransformSpace space = TS_LOCAL)", asMETHODPR(T, Rotate, (const Quaternion&, TransformSpace), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Rotate(const Quaternion&in, TransformSpace space = TS_LOCAL)", asMETHODPR(T, Rotate, (const Quaternion&, TransformSpace), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void Rotate(float, TransformSpace space = TS_LOCAL)", asMETHODPR(T, Rotate, (float, TransformSpace), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void Rotate2D(float, TransformSpace space = TS_LOCAL)", asMETHODPR(T, Rotate2D, (float, TransformSpace), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void RotateAround(const Vector3&in, const Quaternion&in, TransformSpace space = TS_LOCAL)", asMETHODPR(T, RotateAround, (const Vector3&, const Quaternion&, TransformSpace), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void RotateAround(const Vector3&in, const Quaternion&in, TransformSpace space = TS_LOCAL)", asMETHODPR(T, RotateAround, (const Vector3&, const Quaternion&, TransformSpace), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void RotateAround(const Vector2&in, float, TransformSpace space = TS_LOCAL)", asMETHODPR(T, RotateAround, (const Vector2&, float, TransformSpace), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void RotateAround2D(const Vector2&in, float, TransformSpace space = TS_LOCAL)", asMETHODPR(T, RotateAround2D, (const Vector2&, float, TransformSpace), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Pitch(float, TransformSpace space = TS_LOCAL)", asMETHOD(T, Pitch), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Pitch(float, TransformSpace space = TS_LOCAL)", asMETHOD(T, Pitch), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Yaw(float, TransformSpace space = TS_LOCAL)", asMETHOD(T, Yaw), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Yaw(float, TransformSpace space = TS_LOCAL)", asMETHOD(T, Yaw), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Roll(float, TransformSpace space = TS_LOCAL)", asMETHOD(T, Roll), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Roll(float, TransformSpace space = TS_LOCAL)", asMETHOD(T, Roll), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "bool LookAt(const Vector3&in, const Vector3&in up = Vector3(0, 1, 0), TransformSpace space = TS_WORLD)", asMETHOD(T, LookAt), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "bool LookAt(const Vector3&in, const Vector3&in up = Vector3(0, 1, 0), TransformSpace space = TS_WORLD)", asMETHOD(T, LookAt), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Scale(float)", asMETHODPR(T, Scale, (float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Scale(float)", asMETHODPR(T, Scale, (float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Scale(const Vector3&in)", asMETHODPR(T, Scale, (const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void Scale(const Vector3&in)", asMETHODPR(T, Scale, (const Vector3&), void), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void Scale(const Vector2&in)", asMETHODPR(T, Scale, (const Vector2&), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void Scale2D(const Vector2&in)", asMETHODPR(T, Scale2D, (const Vector2&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Node@+ CreateChild(const String&in name = String(), CreateMode mode = REPLICATED, uint id = 0)", asMETHODPR(T, CreateChild, (const String&, CreateMode, unsigned), Node*), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Node@+ CreateChild(const String&in name = String(), CreateMode mode = REPLICATED, uint id = 0)", asMETHODPR(T, CreateChild, (const String&, CreateMode, unsigned), Node*), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void AddChild(Node@+, uint index = M_MAX_UNSIGNED)", asMETHOD(T, AddChild), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void AddChild(Node@+, uint index = M_MAX_UNSIGNED)", asMETHOD(T, AddChild), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void RemoveChild(Node@+)", asMETHODPR(T, RemoveChild, (Node*), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void RemoveChild(Node@+)", asMETHODPR(T, RemoveChild, (Node*), void), asCALL_THISCALL);
@@ -648,17 +650,17 @@ template <class T> void RegisterNode(asIScriptEngine* engine, const char* classN
     engine->RegisterObjectMethod(className, "bool HasComponent(const String&in) const", asFUNCTION(NodeHasComponent), asCALL_CDECL_OBJLAST);
     engine->RegisterObjectMethod(className, "bool HasComponent(const String&in) const", asFUNCTION(NodeHasComponent), asCALL_CDECL_OBJLAST);
     engine->RegisterObjectMethod(className, "Vector3 LocalToWorld(const Vector3&in) const", asMETHODPR(T, LocalToWorld, (const Vector3&) const, Vector3), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 LocalToWorld(const Vector3&in) const", asMETHODPR(T, LocalToWorld, (const Vector3&) const, Vector3), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 LocalToWorld(const Vector4&in) const", asMETHODPR(T, LocalToWorld, (const Vector4&) const, Vector3), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 LocalToWorld(const Vector4&in) const", asMETHODPR(T, LocalToWorld, (const Vector4&) const, Vector3), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "Vector2 LocalToWorld(const Vector2&in) const", asMETHODPR(T, LocalToWorld, (const Vector2&) const, Vector2), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "Vector2 LocalToWorld2D(const Vector2&in) const", asMETHODPR(T, LocalToWorld2D, (const Vector2&) const, Vector2), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 WorldToLocal(const Vector3&in) const", asMETHODPR(T, WorldToLocal, (const Vector3&) const, Vector3), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 WorldToLocal(const Vector3&in) const", asMETHODPR(T, WorldToLocal, (const Vector3&) const, Vector3), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 WorldToLocal(const Vector4&in) const", asMETHODPR(T, WorldToLocal, (const Vector4&) const, Vector3), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 WorldToLocal(const Vector4&in) const", asMETHODPR(T, WorldToLocal, (const Vector4&) const, Vector3), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "Vector2 WorldToLocal(const Vector2&in) const", asMETHODPR(T, WorldToLocal, (const Vector2&) const, Vector2), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "Vector2 WorldToLocal2D(const Vector2&in) const", asMETHODPR(T, WorldToLocal2D, (const Vector2&) const, Vector2), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_position(const Vector3&in)", asMETHODPR(T, SetPosition, (const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_position(const Vector3&in)", asMETHODPR(T, SetPosition, (const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Vector3& get_position() const", asMETHOD(T, GetPosition), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Vector3& get_position() const", asMETHOD(T, GetPosition), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void set_position2D(const Vector2&in)", asMETHODPR(T, SetPosition, (const Vector2&), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void set_position2D(const Vector2&in)", asMETHODPR(T, SetPosition2D, (const Vector2&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector2 get_position2D() const", asMETHOD(T, GetPosition2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector2 get_position2D() const", asMETHOD(T, GetPosition2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_rotation(const Quaternion&in)", asMETHODPR(T, SetRotation, (const Quaternion&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_rotation(const Quaternion&in)", asMETHODPR(T, SetRotation, (const Quaternion&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Quaternion& get_rotation() const", asMETHOD(T, GetRotation), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Quaternion& get_rotation() const", asMETHOD(T, GetRotation), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void set_rotation2D(float)", asMETHODPR(T, SetRotation, (float), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void set_rotation2D(float)", asMETHODPR(T, SetRotation2D, (float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "float get_rotation2D() const", asMETHOD(T, GetRotation2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "float get_rotation2D() const", asMETHOD(T, GetRotation2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_direction(const Vector3&in)", asMETHOD(T, SetDirection), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_direction(const Vector3&in)", asMETHOD(T, SetDirection), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_direction() const", asMETHOD(T, GetDirection), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_direction() const", asMETHOD(T, GetDirection), asCALL_THISCALL);
@@ -666,15 +668,15 @@ template <class T> void RegisterNode(asIScriptEngine* engine, const char* classN
     engine->RegisterObjectMethod(className, "Vector3 get_right() const", asMETHOD(T, GetRight), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_right() const", asMETHOD(T, GetRight), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_scale(const Vector3&in)", asMETHODPR(T, SetScale, (const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_scale(const Vector3&in)", asMETHODPR(T, SetScale, (const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Vector3& get_scale() const", asMETHOD(T, GetScale), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Vector3& get_scale() const", asMETHOD(T, GetScale), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void set_scale2D(const Vector2&in)", asMETHODPR(T, SetScale, (const Vector2&), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void set_scale2D(const Vector2&in)", asMETHODPR(T, SetScale2D, (const Vector2&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector2 get_scale2D() const", asMETHOD(T, GetScale2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector2 get_scale2D() const", asMETHOD(T, GetScale2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_worldPosition(const Vector3&in)", asMETHODPR(T, SetWorldPosition, (const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_worldPosition(const Vector3&in)", asMETHODPR(T, SetWorldPosition, (const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_worldPosition()", asMETHOD(T, GetWorldPosition), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_worldPosition()", asMETHOD(T, GetWorldPosition), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void set_worldPosition2D(const Vector2&in)", asMETHODPR(T, SetWorldPosition, (const Vector2&), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void set_worldPosition2D(const Vector2&in)", asMETHODPR(T, SetWorldPosition2D, (const Vector2&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector2 get_worldPosition2D()", asMETHOD(T, GetWorldPosition2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector2 get_worldPosition2D()", asMETHOD(T, GetWorldPosition2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_worldRotation(const Quaternion&in)", asMETHODPR(T, SetWorldRotation, (const Quaternion&in), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_worldRotation(const Quaternion&in)", asMETHODPR(T, SetWorldRotation, (const Quaternion&in), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Quaternion get_worldRotation()", asMETHOD(T, GetWorldRotation), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Quaternion get_worldRotation()", asMETHOD(T, GetWorldRotation), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void set_worldRotation2D(float)", asMETHODPR(T, SetWorldRotation, (float), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void set_worldRotation2D(float)", asMETHODPR(T, SetWorldRotation2D, (float), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "float get_worldRotation2D()", asMETHOD(T, GetWorldRotation2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "float get_worldRotation2D()", asMETHOD(T, GetWorldRotation2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_worldDirection(const Vector3&in)", asMETHOD(T, SetWorldDirection), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_worldDirection(const Vector3&in)", asMETHOD(T, SetWorldDirection), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_worldDirection()", asMETHOD(T, GetWorldDirection), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_worldDirection()", asMETHOD(T, GetWorldDirection), asCALL_THISCALL);
@@ -682,7 +684,7 @@ template <class T> void RegisterNode(asIScriptEngine* engine, const char* classN
     engine->RegisterObjectMethod(className, "Vector3 get_worldRight()", asMETHOD(T, GetWorldRight), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_worldRight()", asMETHOD(T, GetWorldRight), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_worldScale(const Vector3&in)", asMETHODPR(T, SetWorldScale, (const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "void set_worldScale(const Vector3&in)", asMETHODPR(T, SetWorldScale, (const Vector3&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_worldScale()", asMETHOD(T, GetWorldScale), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector3 get_worldScale()", asMETHOD(T, GetWorldScale), asCALL_THISCALL);
-    engine->RegisterObjectMethod(className, "void set_worldScale2D(const Vector2&in)", asMETHODPR(T, SetWorldScale, (const Vector2&), void), asCALL_THISCALL);
+    engine->RegisterObjectMethod(className, "void set_worldScale2D(const Vector2&in)", asMETHODPR(T, SetWorldScale2D, (const Vector2&), void), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector2 get_worldScale2D()", asMETHOD(T, GetWorldScale2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Vector2 get_worldScale2D()", asMETHOD(T, GetWorldScale2D), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Matrix3x4 get_transform() const", asMETHOD(T, GetTransform), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "Matrix3x4 get_transform() const", asMETHOD(T, GetTransform), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Matrix3x4& get_worldTransform() const", asMETHOD(T, GetWorldTransform), asCALL_THISCALL);
     engine->RegisterObjectMethod(className, "const Matrix3x4& get_worldTransform() const", asMETHOD(T, GetWorldTransform), asCALL_THISCALL);