mirror of https://github.com/AxioDL/zeus.git
Add equality operators for CTransform and CMatrix3f
This commit is contained in:
parent
a136d77458
commit
7d77992ed7
|
@ -157,6 +157,11 @@ public:
|
|||
return ret;
|
||||
}
|
||||
|
||||
inline bool operator==(const CMatrix3f& other) const
|
||||
{
|
||||
return vec[0] == other.vec[0] && vec[1] == other.vec[1] && vec[2] == other.vec[2];
|
||||
}
|
||||
|
||||
static const CMatrix3f skIdentityMatrix3f;
|
||||
|
||||
void transpose();
|
||||
|
|
|
@ -31,6 +31,11 @@ public:
|
|||
|
||||
static inline CTransform Identity() { return CTransform(CMatrix3f::skIdentityMatrix3f); }
|
||||
|
||||
inline bool operator ==(const CTransform& other) const
|
||||
{
|
||||
return origin == other.origin && basis == other.basis;
|
||||
}
|
||||
|
||||
inline CTransform operator*(const CTransform& rhs) const
|
||||
{
|
||||
return CTransform(basis * rhs.basis, origin + (basis * rhs.origin));
|
||||
|
|
Loading…
Reference in New Issue