|
|
|
@ -79,7 +79,7 @@ template<class T = GLfloat> class MatrixTransformation3D: public AbstractTransla |
|
|
|
* @param type Transformation type |
|
|
|
* @param type Transformation type |
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
inline MatrixTransformation3D<T>* multiplyTransformation(const Math::Matrix4<T>& transformation, TransformationType type = TransformationType::Global) { |
|
|
|
inline MatrixTransformation3D<T>* transform(const Math::Matrix4<T>& transformation, TransformationType type = TransformationType::Global) { |
|
|
|
setTransformation(type == TransformationType::Global ? |
|
|
|
setTransformation(type == TransformationType::Global ? |
|
|
|
transformation*_transformation : _transformation*transformation); |
|
|
|
transformation*_transformation : _transformation*transformation); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
@ -87,19 +87,19 @@ template<class T = GLfloat> class MatrixTransformation3D: public AbstractTransla |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @copydoc AbstractTranslationRotationScaling3D::translate() |
|
|
|
* @copydoc AbstractTranslationRotationScaling3D::translate() |
|
|
|
* Same as calling multiplyTransformation() with Matrix4::translation(). |
|
|
|
* Same as calling transform() with Matrix4::translation(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
inline MatrixTransformation3D<T>* translate(const Math::Vector3<T>& vector, TransformationType type = TransformationType::Global) override { |
|
|
|
inline MatrixTransformation3D<T>* translate(const Math::Vector3<T>& vector, TransformationType type = TransformationType::Global) override { |
|
|
|
multiplyTransformation(Math::Matrix4<T>::translation(vector), type); |
|
|
|
transform(Math::Matrix4<T>::translation(vector), type); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @copydoc AbstractTranslationRotationScaling3D::rotate() |
|
|
|
* @copydoc AbstractTranslationRotationScaling3D::rotate() |
|
|
|
* Same as calling multiplyTransformation() with Matrix4::rotation(). |
|
|
|
* Same as calling transform() with Matrix4::rotation(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
inline MatrixTransformation3D<T>* rotate(T angle, const Math::Vector3<T>& normalizedAxis, TransformationType type = TransformationType::Global) override { |
|
|
|
inline MatrixTransformation3D<T>* rotate(T angle, const Math::Vector3<T>& normalizedAxis, TransformationType type = TransformationType::Global) override { |
|
|
|
multiplyTransformation(Math::Matrix4<T>::rotation(angle, normalizedAxis), type); |
|
|
|
transform(Math::Matrix4<T>::rotation(angle, normalizedAxis), type); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -109,11 +109,11 @@ template<class T = GLfloat> class MatrixTransformation3D: public AbstractTransla |
|
|
|
* @param type Transformation type |
|
|
|
* @param type Transformation type |
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
* |
|
|
|
* |
|
|
|
* Same as calling multiplyTransformation() with Matrix4::rotationX(). |
|
|
|
* Same as calling transform() with Matrix4::rotationX(). |
|
|
|
* @see deg(), rad() |
|
|
|
* @see deg(), rad() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
inline MatrixTransformation3D<T>* rotateX(T angle, TransformationType type = TransformationType::Global) override { |
|
|
|
inline MatrixTransformation3D<T>* rotateX(T angle, TransformationType type = TransformationType::Global) override { |
|
|
|
multiplyTransformation(Math::Matrix4<T>::rotationX(angle), type); |
|
|
|
transform(Math::Matrix4<T>::rotationX(angle), type); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -123,11 +123,11 @@ template<class T = GLfloat> class MatrixTransformation3D: public AbstractTransla |
|
|
|
* @param type Transformation type |
|
|
|
* @param type Transformation type |
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
* |
|
|
|
* |
|
|
|
* Same as calling multiplyTransformation() with Matrix4::rotationY(). |
|
|
|
* Same as calling transform() with Matrix4::rotationY(). |
|
|
|
* @see deg(), rad() |
|
|
|
* @see deg(), rad() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
inline MatrixTransformation3D<T>* rotateY(T angle, TransformationType type = TransformationType::Global) override { |
|
|
|
inline MatrixTransformation3D<T>* rotateY(T angle, TransformationType type = TransformationType::Global) override { |
|
|
|
multiplyTransformation(Math::Matrix4<T>::rotationY(angle), type); |
|
|
|
transform(Math::Matrix4<T>::rotationY(angle), type); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -137,20 +137,20 @@ template<class T = GLfloat> class MatrixTransformation3D: public AbstractTransla |
|
|
|
* @param type Transformation type |
|
|
|
* @param type Transformation type |
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
* |
|
|
|
* |
|
|
|
* Same as calling multiplyTransformation() with Matrix4::rotationZ(). |
|
|
|
* Same as calling transform() with Matrix4::rotationZ(). |
|
|
|
* @see deg(), rad() |
|
|
|
* @see deg(), rad() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
inline MatrixTransformation3D<T>* rotateZ(T angle, TransformationType type = TransformationType::Global) override { |
|
|
|
inline MatrixTransformation3D<T>* rotateZ(T angle, TransformationType type = TransformationType::Global) override { |
|
|
|
multiplyTransformation(Math::Matrix4<T>::rotationZ(angle), type); |
|
|
|
transform(Math::Matrix4<T>::rotationZ(angle), type); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @copydoc AbstractTranslationRotationScaling3D::scale() |
|
|
|
* @copydoc AbstractTranslationRotationScaling3D::scale() |
|
|
|
* Same as calling multiplyTransformation() with Matrix4::scaling(). |
|
|
|
* Same as calling transform() with Matrix4::scaling(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
inline MatrixTransformation3D<T>* scale(const Math::Vector3<T>& vector, TransformationType type = TransformationType::Global) override { |
|
|
|
inline MatrixTransformation3D<T>* scale(const Math::Vector3<T>& vector, TransformationType type = TransformationType::Global) override { |
|
|
|
multiplyTransformation(Math::Matrix4<T>::scaling(vector), type); |
|
|
|
transform(Math::Matrix4<T>::scaling(vector), type); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|