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}); }
|
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)
|
inline CTransform& operator+=(const CVector3f& other)
|
||||||
{
|
{
|
||||||
m_origin += other;
|
m_origin += other;
|
||||||
return *this;
|
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)); }
|
inline void rotate(const CVector3f& euler) { *this = *this * CMatrix3f(CQuaternion(euler)); }
|
||||||
|
|
||||||
static inline CTransform RotateX(float theta)
|
static inline CTransform RotateX(float theta)
|
||||||
|
|
Loading…
Reference in New Issue