summaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/math/Matrix.h11
-rw-r--r--src/math/Vector.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/math/Matrix.h b/src/math/Matrix.h
index da38cb1d..35972e7f 100644
--- a/src/math/Matrix.h
+++ b/src/math/Matrix.h
@@ -243,6 +243,17 @@ public:
m_matrix.pos.y = 0.0f;
m_matrix.pos.z = 0.0f;
}
+ void ResetOrientation(void) {
+ m_matrix.right.x = 1.0f;
+ m_matrix.right.y = 0.0f;
+ m_matrix.right.z = 0.0f;
+ m_matrix.up.x = 0.0f;
+ m_matrix.up.y = 1.0f;
+ m_matrix.up.z = 0.0f;
+ m_matrix.at.x = 0.0f;
+ m_matrix.at.y = 0.0f;
+ m_matrix.at.z = 1.0f;
+ }
};
diff --git a/src/math/Vector.h b/src/math/Vector.h
index 6f544ada..1274a4b2 100644
--- a/src/math/Vector.h
+++ b/src/math/Vector.h
@@ -83,7 +83,7 @@ public:
return x == right.x && y == right.y && z == right.z;
}
- bool IsZero(void) { return x == 0.0f && y == 0.0f && z == 0.0f; }
+ bool IsZero(void) const { return x == 0.0f && y == 0.0f && z == 0.0f; }
};
inline CVector operator+(const CVector &left, const CVector &right)