Add identity transform constant

This commit is contained in:
Jack Andersen 2018-12-14 20:29:14 -10:00
parent 7df9f9b7ec
commit 4352f0d4a9
2 changed files with 5 additions and 1 deletions

View File

@ -35,7 +35,9 @@ public:
CTransform(const CVector3f& c0, const CVector3f& c1, const CVector3f& c2, const CVector3f& c3)
: basis(c0, c1, c2), origin(c3) {}
static CTransform Identity() { return CTransform(CMatrix3f::skIdentityMatrix3f); }
static const CTransform skIdentityTransform;
static const CTransform& Identity() { return skIdentityTransform; }
bool operator==(const CTransform& other) const { return origin == other.origin && basis == other.basis; }

View File

@ -1,6 +1,8 @@
#include "zeus/CTransform.hpp"
namespace zeus {
const CTransform CTransform::skIdentityTransform;
CTransform CTransformFromEditorEuler(const CVector3f& eulerVec) {
CTransform result;
double ti, tj, th, ci, cj, ch, si, sj, sh, cc, cs, sc, ss;