|
|
|
@ -1328,21 +1328,17 @@ template<class T> Matrix4<T> Matrix4<T>::lookAt(const Vector3<T>& eye, const Vec |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<class T> Matrix3x3<T> Matrix4<T>::rotation() const { |
|
|
|
template<class T> Matrix3x3<T> Matrix4<T>::rotation() const { |
|
|
|
Matrix3x3<T> rotation{(*this)[0].xyz().normalized(), |
|
|
|
Matrix3x3<T> rotationShear = this->rotationShear(); |
|
|
|
(*this)[1].xyz().normalized(), |
|
|
|
CORRADE_DEBUG_ASSERT(rotationShear.isOrthogonal(), |
|
|
|
(*this)[2].xyz().normalized()}; |
|
|
|
"Math::Matrix4::rotation(): the normalized rotation part is not orthogonal:" << Debug::newline << rotationShear, {}); |
|
|
|
CORRADE_DEBUG_ASSERT(rotation.isOrthogonal(), |
|
|
|
return rotationShear; |
|
|
|
"Math::Matrix4::rotation(): the normalized rotation part is not orthogonal:" << Debug::newline << rotation, {}); |
|
|
|
|
|
|
|
return rotation; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<class T> Matrix3x3<T> Matrix4<T>::rotationNormalized() const { |
|
|
|
template<class T> Matrix3x3<T> Matrix4<T>::rotationNormalized() const { |
|
|
|
Matrix3x3<T> rotation{(*this)[0].xyz(), |
|
|
|
Matrix3x3<T> rotationScaling = this->rotationScaling(); |
|
|
|
(*this)[1].xyz(), |
|
|
|
CORRADE_DEBUG_ASSERT(rotationScaling.isOrthogonal(), |
|
|
|
(*this)[2].xyz()}; |
|
|
|
"Math::Matrix4::rotationNormalized(): the rotation part is not orthogonal:" << Debug::newline << rotationScaling, {}); |
|
|
|
CORRADE_DEBUG_ASSERT(rotation.isOrthogonal(), |
|
|
|
return rotationScaling; |
|
|
|
"Math::Matrix4::rotationNormalized(): the rotation part is not orthogonal:" << Debug::newline << rotation, {}); |
|
|
|
|
|
|
|
return rotation; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<class T> T Matrix4<T>::uniformScalingSquared() const { |
|
|
|
template<class T> T Matrix4<T>::uniformScalingSquared() const { |
|
|
|
|