### Added some functionality to cgt::Matrix4<T>:

```* Introducing cgt::Matrix4<T>::getXYZRotation() (one method for each X, Y, Z)
* Introducing cgt::Matrix4<T>::getTranslationPart()```
parent fb202e6b
 ... ... @@ -508,6 +508,26 @@ struct Matrix4 { return result; } /// Returns a vector representing the result when applying the matrix' rotation to a x unit vector. /// (This is equivalent to the first column vector of this matrix) Vector3 getXRotation() const { return Vector3(t00, t10, t20); } /// Returns a vector representing the result when applying the matrix' rotation to a y unit vector. /// (This is equivalent to the second column vector of this matrix) Vector3 getYRotation() const { return Vector3(t01, t11, t21); } /// Returns a vector representing the result when applying the matrix' rotation to a z unit vector. /// (This is equivalent to the third column vector of this matrix) Vector3 getZRotation() const { return Vector3(t02, t12, t22); } /// Returns a vector representing the scaling applied to unit vectors by this matrix. Vector3 getScalingPart() const { Vector3 result(T(0)); ... ... @@ -516,7 +536,13 @@ struct Matrix4 { result.elem = length(Vector3(t02, t12, t22)); return result; } /* /// Returns a vector representing the translational part of this matrix. Vector3 getTranslationPart() const { return Vector3(t03, t13, t23); } /* create special matrices */ static const Matrix4 zero; ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!