mirror of https://github.com/AxioDL/zeus.git
More CTransform affine operators
This commit is contained in:
parent
bd88f654a9
commit
876a6030bb
|
@ -43,12 +43,28 @@ public:
|
|||
|
||||
static inline CTransform Translate(float x, float y, float z) { return Translate({x, y, z}); }
|
||||
|
||||
inline CTransform operator+(const CVector3f& other)
|
||||
{
|
||||
return CTransform(m_basis, m_origin + other);
|
||||
}
|
||||
|
||||
inline CTransform& operator+=(const CVector3f& other)
|
||||
{
|
||||
m_origin += other;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline CTransform operator-(const CVector3f& other)
|
||||
{
|
||||
return CTransform(m_basis, m_origin - other);
|
||||
}
|
||||
|
||||
inline CTransform& operator-=(const CVector3f& other)
|
||||
{
|
||||
m_origin -= other;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline void rotate(const CVector3f& euler) { *this = *this * CMatrix3f(CQuaternion(euler)); }
|
||||
|
||||
static inline CTransform RotateX(float theta)
|
||||
|
|
Loading…
Reference in New Issue