From 6efb5607fa4fd2e0fc91c8f0a3f7c44fff777187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 11 Nov 2012 01:08:16 +0100 Subject: [PATCH] SceneGraph: renamed multiplyTransformation() to transform(). It is shorter and looks better. --- src/SceneGraph/MatrixTransformation2D.h | 16 +++++++-------- src/SceneGraph/MatrixTransformation3D.h | 26 ++++++++++++------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/SceneGraph/MatrixTransformation2D.h b/src/SceneGraph/MatrixTransformation2D.h index e2e9b783f..b25ea2e1f 100644 --- a/src/SceneGraph/MatrixTransformation2D.h +++ b/src/SceneGraph/MatrixTransformation2D.h @@ -74,12 +74,12 @@ template class MatrixTransformation2D: public AbstractTransla } /** - * @brief Multiply transformation + * @brief Transform object * @param transformation Transformation * @param type Transformation type * @return Pointer to self (for method chaining) */ - inline MatrixTransformation2D* multiplyTransformation(const Math::Matrix3& transformation, TransformationType type = TransformationType::Global) { + inline MatrixTransformation2D* transform(const Math::Matrix3& transformation, TransformationType type = TransformationType::Global) { setTransformation(type == TransformationType::Global ? transformation*_transformation : _transformation*transformation); return this; @@ -87,28 +87,28 @@ template class MatrixTransformation2D: public AbstractTransla /** * @copydoc AbstractTranslationRotationScaling2D::translate() - * Same as calling multiplyTransformation() with Matrix3::translation(). + * Same as calling transform() with Matrix3::translation(). */ inline MatrixTransformation2D* translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { - multiplyTransformation(Math::Matrix3::translation(vector), type); + transform(Math::Matrix3::translation(vector), type); return this; } /** * @copydoc AbstractTranslationRotationScaling2D::rotate() - * Same as calling multiplyTransformation() with Matrix3::rotation(). + * Same as calling transform() with Matrix3::rotation(). */ inline MatrixTransformation2D* rotate(T angle, TransformationType type = TransformationType::Global) override { - multiplyTransformation(Math::Matrix3::rotation(angle), type); + transform(Math::Matrix3::rotation(angle), type); return this; } /** * @copydoc AbstractTranslationRotationScaling2D::scale() - * Same as calling multiplyTransformation() with Matrix3::scaling(). + * Same as calling transform() with Matrix3::scaling(). */ inline MatrixTransformation2D* scale(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { - multiplyTransformation(Math::Matrix3::scaling(vector), type); + transform(Math::Matrix3::scaling(vector), type); return this; } diff --git a/src/SceneGraph/MatrixTransformation3D.h b/src/SceneGraph/MatrixTransformation3D.h index 973e0bd36..dff09d723 100644 --- a/src/SceneGraph/MatrixTransformation3D.h +++ b/src/SceneGraph/MatrixTransformation3D.h @@ -79,7 +79,7 @@ template class MatrixTransformation3D: public AbstractTransla * @param type Transformation type * @return Pointer to self (for method chaining) */ - inline MatrixTransformation3D* multiplyTransformation(const Math::Matrix4& transformation, TransformationType type = TransformationType::Global) { + inline MatrixTransformation3D* transform(const Math::Matrix4& transformation, TransformationType type = TransformationType::Global) { setTransformation(type == TransformationType::Global ? transformation*_transformation : _transformation*transformation); return this; @@ -87,19 +87,19 @@ template class MatrixTransformation3D: public AbstractTransla /** * @copydoc AbstractTranslationRotationScaling3D::translate() - * Same as calling multiplyTransformation() with Matrix4::translation(). + * Same as calling transform() with Matrix4::translation(). */ inline MatrixTransformation3D* translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { - multiplyTransformation(Math::Matrix4::translation(vector), type); + transform(Math::Matrix4::translation(vector), type); return this; } /** * @copydoc AbstractTranslationRotationScaling3D::rotate() - * Same as calling multiplyTransformation() with Matrix4::rotation(). + * Same as calling transform() with Matrix4::rotation(). */ inline MatrixTransformation3D* rotate(T angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) override { - multiplyTransformation(Math::Matrix4::rotation(angle, normalizedAxis), type); + transform(Math::Matrix4::rotation(angle, normalizedAxis), type); return this; } @@ -109,11 +109,11 @@ template class MatrixTransformation3D: public AbstractTransla * @param type Transformation type * @return Pointer to self (for method chaining) * - * Same as calling multiplyTransformation() with Matrix4::rotationX(). + * Same as calling transform() with Matrix4::rotationX(). * @see deg(), rad() */ inline MatrixTransformation3D* rotateX(T angle, TransformationType type = TransformationType::Global) override { - multiplyTransformation(Math::Matrix4::rotationX(angle), type); + transform(Math::Matrix4::rotationX(angle), type); return this; } @@ -123,11 +123,11 @@ template class MatrixTransformation3D: public AbstractTransla * @param type Transformation type * @return Pointer to self (for method chaining) * - * Same as calling multiplyTransformation() with Matrix4::rotationY(). + * Same as calling transform() with Matrix4::rotationY(). * @see deg(), rad() */ inline MatrixTransformation3D* rotateY(T angle, TransformationType type = TransformationType::Global) override { - multiplyTransformation(Math::Matrix4::rotationY(angle), type); + transform(Math::Matrix4::rotationY(angle), type); return this; } @@ -137,20 +137,20 @@ template class MatrixTransformation3D: public AbstractTransla * @param type Transformation type * @return Pointer to self (for method chaining) * - * Same as calling multiplyTransformation() with Matrix4::rotationZ(). + * Same as calling transform() with Matrix4::rotationZ(). * @see deg(), rad() */ inline MatrixTransformation3D* rotateZ(T angle, TransformationType type = TransformationType::Global) override { - multiplyTransformation(Math::Matrix4::rotationZ(angle), type); + transform(Math::Matrix4::rotationZ(angle), type); return this; } /** * @copydoc AbstractTranslationRotationScaling3D::scale() - * Same as calling multiplyTransformation() with Matrix4::scaling(). + * Same as calling transform() with Matrix4::scaling(). */ inline MatrixTransformation3D* scale(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { - multiplyTransformation(Math::Matrix4::scaling(vector), type); + transform(Math::Matrix4::scaling(vector), type); return this; }