|
@@ -199,6 +199,11 @@ public:
|
|
|
const Quaternion& GetRotation() const { return rotation_; }
|
|
const Quaternion& GetRotation() const { return rotation_; }
|
|
|
/// Return forward direction in parent space. Positive Z axis equals identity rotation.
|
|
/// Return forward direction in parent space. Positive Z axis equals identity rotation.
|
|
|
Vector3 GetDirection() const { return rotation_ * Vector3::FORWARD; }
|
|
Vector3 GetDirection() const { return rotation_ * Vector3::FORWARD; }
|
|
|
|
|
+ /// Return up direction in parent space. Positive Y axis equals identity rotation.
|
|
|
|
|
+ Vector3 GetUp() const { return rotation_ * Vector3::UP; }
|
|
|
|
|
+ /// Return right direction in parent space. Positive X axis equals identity rotation.
|
|
|
|
|
+ Vector3 GetRight() const { return rotation_ * Vector3::RIGHT; }
|
|
|
|
|
+
|
|
|
/// Return scale in parent space.
|
|
/// Return scale in parent space.
|
|
|
const Vector3& GetScale() const { return scale_; }
|
|
const Vector3& GetScale() const { return scale_; }
|
|
|
/// Return parent space transform matrix.
|
|
/// Return parent space transform matrix.
|
|
@@ -231,6 +236,24 @@ public:
|
|
|
return worldRotation_ * Vector3::FORWARD;
|
|
return worldRotation_ * Vector3::FORWARD;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// Return node's up vector in world space.
|
|
|
|
|
+ Vector3 GetWorldUp() const
|
|
|
|
|
+ {
|
|
|
|
|
+ if (dirty_)
|
|
|
|
|
+ UpdateWorldTransform();
|
|
|
|
|
+
|
|
|
|
|
+ return worldRotation_ * Vector3::UP;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /// Return node's right vector in world space.
|
|
|
|
|
+ Vector3 GetWorldRight() const
|
|
|
|
|
+ {
|
|
|
|
|
+ if (dirty_)
|
|
|
|
|
+ UpdateWorldTransform();
|
|
|
|
|
+
|
|
|
|
|
+ return worldRotation_ * Vector3::RIGHT;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// Return scale in world space.
|
|
/// Return scale in world space.
|
|
|
Vector3 GetWorldScale() const
|
|
Vector3 GetWorldScale() const
|
|
|
{
|
|
{
|