From d3c37a396257b77a063ac93fbba7e576fa2075a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 25 May 2013 23:34:22 +0200 Subject: [PATCH] SceneGraph: removed redundant `inline` keyword. --- doc/scenegraph.dox | 2 +- src/SceneGraph/AbstractCamera.h | 14 ++++---- src/SceneGraph/AbstractCamera.hpp | 4 +-- src/SceneGraph/AbstractFeature.h | 18 +++++----- src/SceneGraph/AbstractGroupedFeature.h | 8 ++--- src/SceneGraph/AbstractObject.h | 10 +++--- src/SceneGraph/Animable.h | 22 ++++++------ src/SceneGraph/AnimableGroup.h | 4 +-- src/SceneGraph/Camera2D.h | 2 +- src/SceneGraph/Camera3D.h | 6 ++-- src/SceneGraph/Drawable.h | 2 +- src/SceneGraph/DualComplexTransformation.h | 26 +++++++------- src/SceneGraph/DualQuaternionTransformation.h | 30 ++++++++-------- src/SceneGraph/FeatureGroup.h | 8 ++--- src/SceneGraph/MatrixTransformation2D.h | 26 +++++++------- src/SceneGraph/MatrixTransformation3D.h | 30 ++++++++-------- src/SceneGraph/Object.h | 34 +++++++++---------- src/SceneGraph/Object.hpp | 4 +-- src/SceneGraph/RigidMatrixTransformation2D.h | 28 +++++++-------- src/SceneGraph/RigidMatrixTransformation3D.h | 32 ++++++++--------- src/SceneGraph/Scene.h | 2 +- src/SceneGraph/Test/CameraTest.cpp | 2 +- src/SceneGraph/Test/ObjectTest.cpp | 2 +- 23 files changed, 158 insertions(+), 158 deletions(-) diff --git a/doc/scenegraph.dox b/doc/scenegraph.dox index d634c0188..f20938241 100644 --- a/doc/scenegraph.dox +++ b/doc/scenegraph.dox @@ -151,7 +151,7 @@ Simplified example: @code class Bomb: public Object3D, SceneGraph::Drawable3D<>, SceneGraph:.Animable3D<> { public: - inline Bomb(Object3D* parent): Object3D(parent), SceneGraph::Drawable3D<>(this), SceneGraph::Animable3D<>(this) {} + Bomb(Object3D* parent): Object3D(parent), SceneGraph::Drawable3D<>(this), SceneGraph::Animable3D<>(this) {} protected: // drawing implementation for Drawable feature diff --git a/src/SceneGraph/AbstractCamera.h b/src/SceneGraph/AbstractCamera.h index 50851429a..43287ba10 100644 --- a/src/SceneGraph/AbstractCamera.h +++ b/src/SceneGraph/AbstractCamera.h @@ -88,7 +88,7 @@ class MAGNUM_SCENEGRAPH_EXPORT AbstractCamera: public AbstractFeature::MatrixType cameraMatrix() { + typename DimensionTraits::MatrixType cameraMatrix() { AbstractFeature::object()->setClean(); return _cameraMatrix; } @@ -114,7 +114,7 @@ class MAGNUM_SCENEGRAPH_EXPORT AbstractCamera: public AbstractFeature::MatrixType projectionMatrix() const { return _projectionMatrix; } + typename DimensionTraits::MatrixType projectionMatrix() const { return _projectionMatrix; } /** * @brief Size of (near) XY plane in current projection @@ -122,12 +122,12 @@ class MAGNUM_SCENEGRAPH_EXPORT AbstractCamera: public AbstractFeature projectionSize() const { + Math::Vector2 projectionSize() const { return {T(2.0)/_projectionMatrix[0].x(), T(2.0)/_projectionMatrix[1].y()}; } /** @brief Viewport size */ - inline Vector2i viewport() const { return _viewport; } + Vector2i viewport() const { return _viewport; } /** * @brief Set viewport size @@ -147,12 +147,12 @@ class MAGNUM_SCENEGRAPH_EXPORT AbstractCamera: public AbstractFeature::MatrixType& invertedAbsoluteTransformationMatrix) override { + void cleanInverted(const typename DimensionTraits::MatrixType& invertedAbsoluteTransformationMatrix) override { _cameraMatrix = invertedAbsoluteTransformationMatrix; } #ifndef DOXYGEN_GENERATING_OUTPUT - inline void fixAspectRatio() { + void fixAspectRatio() { _projectionMatrix = Implementation::aspectRatioFix(_aspectRatioPolicy, {rawProjectionMatrix[0].x(), rawProjectionMatrix[1].y()}, _viewport)*rawProjectionMatrix; } diff --git a/src/SceneGraph/AbstractCamera.hpp b/src/SceneGraph/AbstractCamera.hpp index ceacc265e..d09bc894d 100644 --- a/src/SceneGraph/AbstractCamera.hpp +++ b/src/SceneGraph/AbstractCamera.hpp @@ -42,13 +42,13 @@ template class Camera {}; template class Camera<2, T> { public: - inline constexpr static Math::Matrix3 aspectRatioScale(const Math::Vector2& scale) { + constexpr static Math::Matrix3 aspectRatioScale(const Math::Vector2& scale) { return Math::Matrix3::scaling({scale.x(), scale.y()}); } }; template class Camera<3, T> { public: - inline constexpr static Math::Matrix4 aspectRatioScale(const Math::Vector2& scale) { + constexpr static Math::Matrix4 aspectRatioScale(const Math::Vector2& scale) { return Math::Matrix4::scaling({scale.x(), scale.y(), 1.0f}); } }; diff --git a/src/SceneGraph/AbstractFeature.h b/src/SceneGraph/AbstractFeature.h index a95145ec0..200e8c4a5 100644 --- a/src/SceneGraph/AbstractFeature.h +++ b/src/SceneGraph/AbstractFeature.h @@ -108,7 +108,7 @@ parameter: @code class TransformingFeature: public SceneGraph::AbstractFeature3D<> { public: - template inline TransformingFeature(SceneGraph::Object* object): + template TransformingFeature(SceneGraph::Object* object): SceneGraph::AbstractFeature3D<>(object), transformation(object) {} private: @@ -155,32 +155,32 @@ template class AbstractFeature virtual ~AbstractFeature() = 0; /** @brief %Object holding this feature */ - inline AbstractObject* object() { + AbstractObject* object() { return Containers::LinkedListItem, AbstractObject>::list(); } /** @overload */ - inline const AbstractObject* object() const { + const AbstractObject* object() const { return Containers::LinkedListItem, AbstractObject>::list(); } /** @brief Previous feature or `nullptr`, if this is first feature */ - inline AbstractFeature* previousFeature() { + AbstractFeature* previousFeature() { return Containers::LinkedListItem, AbstractObject>::previous(); } /** @overload */ - inline const AbstractFeature* previousFeature() const { + const AbstractFeature* previousFeature() const { return Containers::LinkedListItem, AbstractObject>::previous(); } /** @brief Next feature or `nullptr`, if this is last feature */ - inline AbstractFeature* nextFeature() { + AbstractFeature* nextFeature() { return Containers::LinkedListItem, AbstractObject>::next(); } /** @overload */ - inline const AbstractFeature* nextFeature() const { + const AbstractFeature* nextFeature() const { return Containers::LinkedListItem, AbstractObject>::next(); } @@ -237,7 +237,7 @@ template class AbstractFeature * * @see @ref scenegraph-caching, clean(), cleanInverted() */ - inline CachedTransformations cachedTransformations() const { + CachedTransformations cachedTransformations() const { return _cachedTransformations; } @@ -252,7 +252,7 @@ template class AbstractFeature * Nothing is enabled by default. * @see @ref scenegraph-caching */ - inline void setCachedTransformations(CachedTransformations transformations) { + void setCachedTransformations(CachedTransformations transformations) { _cachedTransformations = transformations; } diff --git a/src/SceneGraph/AbstractGroupedFeature.h b/src/SceneGraph/AbstractGroupedFeature.h index 2eba08bd1..8b636c885 100644 --- a/src/SceneGraph/AbstractGroupedFeature.h +++ b/src/SceneGraph/AbstractGroupedFeature.h @@ -82,7 +82,7 @@ class AbstractGroupedFeature: public AbstractFeature { * Adds the feature to the object and to group, if specified. * @see FeatureGroup::add() */ - inline explicit AbstractGroupedFeature(AbstractObject* object, FeatureGroup* group = nullptr): AbstractFeature(object), _group(nullptr) { + explicit AbstractGroupedFeature(AbstractObject* object, FeatureGroup* group = nullptr): AbstractFeature(object), _group(nullptr) { if(group) group->add(static_cast(this)); } @@ -92,17 +92,17 @@ class AbstractGroupedFeature: public AbstractFeature { * Removes the feature from object and from group, if it belongs to * any. */ - inline ~AbstractGroupedFeature() { + ~AbstractGroupedFeature() { if(_group) _group->remove(static_cast(this)); } /** @brief Group this feature belongs to */ - inline FeatureGroup* group() { + FeatureGroup* group() { return _group; } /** @overload */ - inline const FeatureGroup* group() const { + const FeatureGroup* group() const { return _group; } diff --git a/src/SceneGraph/AbstractObject.h b/src/SceneGraph/AbstractObject.h index 9dee8d3f2..ae1ce7440 100644 --- a/src/SceneGraph/AbstractObject.h +++ b/src/SceneGraph/AbstractObject.h @@ -74,27 +74,27 @@ template class AbstractObject virtual ~AbstractObject(); /** @brief Whether this object has features */ - inline bool hasFeatures() const { + bool hasFeatures() const { return !Containers::LinkedList>::isEmpty(); } /** @brief First object feature or `nullptr`, if this object has no features */ - inline FeatureType* firstFeature() { + FeatureType* firstFeature() { return Containers::LinkedList>::first(); } /** @overload */ - inline const FeatureType* firstFeature() const { + const FeatureType* firstFeature() const { return Containers::LinkedList>::first(); } /** @brief Last object feature or `nullptr`, if this object has no features */ - inline FeatureType* lastFeature() { + FeatureType* lastFeature() { return Containers::LinkedList>::last(); } /** @overload */ - inline const FeatureType* lastFeature() const { + const FeatureType* lastFeature() const { return Containers::LinkedList>::last(); } diff --git a/src/SceneGraph/Animable.h b/src/SceneGraph/Animable.h index 1d5cba5a9..207f4edf8 100644 --- a/src/SceneGraph/Animable.h +++ b/src/SceneGraph/Animable.h @@ -162,10 +162,10 @@ class MAGNUM_SCENEGRAPH_EXPORT Animable: public AbstractGroupedFeature* setRepeated(bool repeated) { + Animable* setRepeated(bool repeated) { _repeated = repeated; return this; } @@ -204,7 +204,7 @@ class MAGNUM_SCENEGRAPH_EXPORT Animable: public AbstractGroupedFeature* setRepeatCount(UnsignedShort count) { + Animable* setRepeatCount(UnsignedShort count) { _repeatCount = count; return this; } @@ -236,7 +236,7 @@ class MAGNUM_SCENEGRAPH_EXPORT Animable: public AbstractGroupedFeature* setDuration(Float duration) { + Animable* setDuration(Float duration) { _duration = duration; return this; } @@ -274,7 +274,7 @@ class MAGNUM_SCENEGRAPH_EXPORT Animable: public AbstractGroupedFeature { /* Overloads to remove WTF-factor from method chaining order */ #ifndef DOXYGEN_GENERATING_OUTPUT - inline Camera2D* setAspectRatioPolicy(AspectRatioPolicy policy) { + Camera2D* setAspectRatioPolicy(AspectRatioPolicy policy) { AbstractCamera<2, T>::setAspectRatioPolicy(policy); return this; } diff --git a/src/SceneGraph/Camera3D.h b/src/SceneGraph/Camera3D.h index bb040ebab..6885037df 100644 --- a/src/SceneGraph/Camera3D.h +++ b/src/SceneGraph/Camera3D.h @@ -108,14 +108,14 @@ class MAGNUM_SCENEGRAPH_EXPORT Camera3D: public AbstractCamera<3, T> { Camera3D* setPerspective(Math::Rad fov, T aspectRatio, T near, T far); /** @brief Near clipping plane */ - inline T near() const { return _near; } + T near() const { return _near; } /** @brief Far clipping plane */ - inline T far() const { return _far; } + T far() const { return _far; } /* Overloads to remove WTF-factor from method chaining order */ #ifndef DOXYGEN_GENERATING_OUTPUT - inline Camera3D* setAspectRatioPolicy(AspectRatioPolicy policy) { + Camera3D* setAspectRatioPolicy(AspectRatioPolicy policy) { AbstractCamera<3, T>::setAspectRatioPolicy(policy); return this; } diff --git a/src/SceneGraph/Drawable.h b/src/SceneGraph/Drawable.h index be31aad84..5afb8b80d 100644 --- a/src/SceneGraph/Drawable.h +++ b/src/SceneGraph/Drawable.h @@ -131,7 +131,7 @@ class Drawable: public AbstractGroupedFeature* object, DrawableGroup* drawables = nullptr): AbstractGroupedFeature, T>(object, drawables) {} + explicit Drawable(AbstractObject* object, DrawableGroup* drawables = nullptr): AbstractGroupedFeature, T>(object, drawables) {} /** * @brief Draw the object using given camera diff --git a/src/SceneGraph/DualComplexTransformation.h b/src/SceneGraph/DualComplexTransformation.h index a63d2eb38..2a963dfd5 100644 --- a/src/SceneGraph/DualComplexTransformation.h +++ b/src/SceneGraph/DualComplexTransformation.h @@ -52,23 +52,23 @@ class DualComplexTransformation: public AbstractTranslationRotation2D { typedef Math::DualComplex DataType; #ifndef DOXYGEN_GENERATING_OUTPUT - inline static Math::DualComplex fromMatrix(const Math::Matrix3& matrix) { + static Math::DualComplex fromMatrix(const Math::Matrix3& matrix) { return Math::DualComplex::fromMatrix(matrix); } - inline constexpr static Math::Matrix3 toMatrix(const Math::DualComplex& transformation) { + constexpr static Math::Matrix3 toMatrix(const Math::DualComplex& transformation) { return transformation.toMatrix(); } - inline static Math::DualComplex compose(const Math::DualComplex& parent, const Math::DualComplex& child) { + static Math::DualComplex compose(const Math::DualComplex& parent, const Math::DualComplex& child) { return parent*child; } - inline static Math::DualComplex inverted(const Math::DualComplex& transformation) { + static Math::DualComplex inverted(const Math::DualComplex& transformation) { return transformation.invertedNormalized(); } - inline Math::DualComplex transformation() const { + Math::DualComplex transformation() const { return _transformation; } #endif @@ -100,7 +100,7 @@ class DualComplexTransformation: public AbstractTranslationRotation2D { return this; } - inline DualComplexTransformation* resetTransformation() override { + DualComplexTransformation* resetTransformation() override { setTransformationInternal({}); return this; } @@ -114,7 +114,7 @@ class DualComplexTransformation: public AbstractTranslationRotation2D { * Expects that the dual complex number is normalized. * @see DualComplex::isNormalized() */ - inline DualComplexTransformation* transform(const Math::DualComplex& transformation, TransformationType type = TransformationType::Global) { + DualComplexTransformation* transform(const Math::DualComplex& transformation, TransformationType type = TransformationType::Global) { CORRADE_ASSERT(transformation.isNormalized(), "SceneGraph::DualComplexTransformation::transform(): the dual complex number is not normalized", this); transformInternal(transformation, type); @@ -125,7 +125,7 @@ class DualComplexTransformation: public AbstractTranslationRotation2D { * @copydoc AbstractTranslationRotationScaling2D::translate() * Same as calling transform() with DualComplex::translation(). */ - inline DualComplexTransformation* translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { + DualComplexTransformation* translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { transformInternal(Math::DualComplex::translation(vector), type); return this; } @@ -139,7 +139,7 @@ class DualComplexTransformation: public AbstractTranslationRotation2D { * Same as calling transform() with DualComplex::rotation(). * @see normalizeRotation() */ - inline DualComplexTransformation* rotate(Math::Rad angle, TransformationType type = TransformationType::Global) override { + DualComplexTransformation* rotate(Math::Rad angle, TransformationType type = TransformationType::Global) override { transformInternal(Math::DualComplex::rotation(angle), type); return this; } @@ -150,18 +150,18 @@ class DualComplexTransformation: public AbstractTranslationRotation2D { * if you want to move it above all. * @return Pointer to self (for method chaining) */ - inline DualComplexTransformation* move(Object>* under) { + DualComplexTransformation* move(Object>* under) { static_cast*>(this)->Containers::template LinkedList>>::move(this, under); return this; } protected: /* Allow construction only from Object */ - inline explicit DualComplexTransformation() = default; + explicit DualComplexTransformation() = default; private: /* No assertions fired, for internal use */ - inline void setTransformationInternal(const Math::DualComplex& transformation) { + void setTransformationInternal(const Math::DualComplex& transformation) { /* Setting transformation is forbidden for the scene */ /** @todo Assert for this? */ /** @todo Do this in some common code so we don't need to include Object? */ @@ -172,7 +172,7 @@ class DualComplexTransformation: public AbstractTranslationRotation2D { } /* No assertions fired, for internal use */ - inline void transformInternal(const Math::DualComplex& transformation, TransformationType type) { + void transformInternal(const Math::DualComplex& transformation, TransformationType type) { setTransformation(type == TransformationType::Global ? transformation*_transformation : _transformation*transformation); } diff --git a/src/SceneGraph/DualQuaternionTransformation.h b/src/SceneGraph/DualQuaternionTransformation.h index 811450d19..2bcf86d27 100644 --- a/src/SceneGraph/DualQuaternionTransformation.h +++ b/src/SceneGraph/DualQuaternionTransformation.h @@ -52,25 +52,25 @@ class DualQuaternionTransformation: public AbstractTranslationRotation3D { typedef Math::DualQuaternion DataType; #ifndef DOXYGEN_GENERATING_OUTPUT - inline static Math::DualQuaternion fromMatrix(const Math::Matrix4& matrix) { + static Math::DualQuaternion fromMatrix(const Math::Matrix4& matrix) { CORRADE_ASSERT(matrix.isRigidTransformation(), "SceneGraph::DualQuaternionTransformation::fromMatrix(): the matrix doesn't represent rigid transformation", {}); return Math::DualQuaternion::fromMatrix(matrix); } - inline constexpr static Math::Matrix4 toMatrix(const Math::DualQuaternion& transformation) { + constexpr static Math::Matrix4 toMatrix(const Math::DualQuaternion& transformation) { return transformation.toMatrix(); } - inline static Math::DualQuaternion compose(const Math::DualQuaternion& parent, const Math::DualQuaternion& child) { + static Math::DualQuaternion compose(const Math::DualQuaternion& parent, const Math::DualQuaternion& child) { return parent*child; } - inline static Math::DualQuaternion inverted(const Math::DualQuaternion& transformation) { + static Math::DualQuaternion inverted(const Math::DualQuaternion& transformation) { return transformation.invertedNormalized(); } - inline Math::DualQuaternion transformation() const { + Math::DualQuaternion transformation() const { return _transformation; } #endif @@ -102,7 +102,7 @@ class DualQuaternionTransformation: public AbstractTranslationRotation3D { return this; } - inline DualQuaternionTransformation* resetTransformation() override { + DualQuaternionTransformation* resetTransformation() override { setTransformation({}); return this; } @@ -116,7 +116,7 @@ class DualQuaternionTransformation: public AbstractTranslationRotation3D { * Expects that the dual quaternion is normalized. * @see DualQuaternion::isNormalized() */ - inline DualQuaternionTransformation* transform(const Math::DualQuaternion& transformation, TransformationType type = TransformationType::Global) { + DualQuaternionTransformation* transform(const Math::DualQuaternion& transformation, TransformationType type = TransformationType::Global) { CORRADE_ASSERT(transformation.isNormalized(), "SceneGraph::DualQuaternionTransformation::transform(): the dual quaternion is not normalized", this); transformInternal(transformation, type); @@ -127,7 +127,7 @@ class DualQuaternionTransformation: public AbstractTranslationRotation3D { * @copydoc AbstractTranslationRotationScaling3D::translate() * Same as calling transform() with DualQuaternion::translation(). */ - inline DualQuaternionTransformation* translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { + DualQuaternionTransformation* translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { transformInternal(Math::DualQuaternion::translation(vector), type); return this; } @@ -143,22 +143,22 @@ class DualQuaternionTransformation: public AbstractTranslationRotation3D { * @see Vector3::xAxis(), Vector3::yAxis(), Vector3::zAxis(), * normalizeRotation() */ - inline DualQuaternionTransformation* rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) override { + DualQuaternionTransformation* rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) override { transformInternal(Math::DualQuaternion::rotation(angle, normalizedAxis), type); return this; } /* Overloads to remove WTF-factor from method chaining order */ #ifndef DOXYGEN_GENERATING_OUTPUT - inline DualQuaternionTransformation* rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) override { + DualQuaternionTransformation* rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) override { AbstractTranslationRotation3D::rotateX(angle, type); return this; } - inline DualQuaternionTransformation* rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) override { + DualQuaternionTransformation* rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) override { AbstractTranslationRotation3D::rotateY(angle, type); return this; } - inline DualQuaternionTransformation* rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) override { + DualQuaternionTransformation* rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) override { AbstractTranslationRotation3D::rotateZ(angle, type); return this; } @@ -166,11 +166,11 @@ class DualQuaternionTransformation: public AbstractTranslationRotation3D { protected: /* Allow construction only from Object */ - inline explicit DualQuaternionTransformation() = default; + explicit DualQuaternionTransformation() = default; private: /* No assertions fired, for internal use */ - inline void setTransformationInternal(const Math::DualQuaternion& transformation) { + void setTransformationInternal(const Math::DualQuaternion& transformation) { /* Setting transformation is forbidden for the scene */ /** @todo Assert for this? */ /** @todo Do this in some common code so we don't need to include Object? */ @@ -181,7 +181,7 @@ class DualQuaternionTransformation: public AbstractTranslationRotation3D { } /* No assertions fired, for internal use */ - inline void transformInternal(const Math::DualQuaternion& transformation, TransformationType type) { + void transformInternal(const Math::DualQuaternion& transformation, TransformationType type) { setTransformation(type == TransformationType::Global ? transformation*_transformation : _transformation*transformation); } diff --git a/src/SceneGraph/FeatureGroup.h b/src/SceneGraph/FeatureGroup.h index 0f7e3cc61..8354a7fc3 100644 --- a/src/SceneGraph/FeatureGroup.h +++ b/src/SceneGraph/FeatureGroup.h @@ -83,18 +83,18 @@ class FeatureGroup: public AbstractFeatureGroup { virtual ~FeatureGroup(); /** @brief Whether the group is empty */ - inline bool isEmpty() const { return this->features.empty(); } + bool isEmpty() const { return this->features.empty(); } /** @brief Count of features in the group */ - inline std::size_t size() const { return this->features.size(); } + std::size_t size() const { return this->features.size(); } /** @brief Feature at given index */ - inline Feature* operator[](std::size_t index) { + Feature* operator[](std::size_t index) { return static_cast(this->features[index]); } /** @overload */ - inline const Feature* operator[](std::size_t index) const { + const Feature* operator[](std::size_t index) const { return static_cast(this->features[index]); } diff --git a/src/SceneGraph/MatrixTransformation2D.h b/src/SceneGraph/MatrixTransformation2D.h index 3c3baca0e..46242c577 100644 --- a/src/SceneGraph/MatrixTransformation2D.h +++ b/src/SceneGraph/MatrixTransformation2D.h @@ -51,23 +51,23 @@ class MatrixTransformation2D: public AbstractTranslationRotationScaling2D { typedef Math::Matrix3 DataType; #ifndef DOXYGEN_GENERATING_OUTPUT - inline constexpr static Math::Matrix3 fromMatrix(const Math::Matrix3& matrix) { + constexpr static Math::Matrix3 fromMatrix(const Math::Matrix3& matrix) { return matrix; } - inline constexpr static Math::Matrix3 toMatrix(const Math::Matrix3& transformation) { + constexpr static Math::Matrix3 toMatrix(const Math::Matrix3& transformation) { return transformation; } - inline static Math::Matrix3 compose(const Math::Matrix3& parent, const Math::Matrix3& child) { + static Math::Matrix3 compose(const Math::Matrix3& parent, const Math::Matrix3& child) { return parent*child; } - inline static Math::Matrix3 inverted(const Math::Matrix3& transformation) { + static Math::Matrix3 inverted(const Math::Matrix3& transformation) { return transformation.inverted(); } - inline Math::Matrix3 transformation() const { + Math::Matrix3 transformation() const { return _transformation; } #endif @@ -94,13 +94,13 @@ class MatrixTransformation2D: public AbstractTranslationRotationScaling2D { * @param type Transformation type * @return Pointer to self (for method chaining) */ - inline MatrixTransformation2D* transform(const Math::Matrix3& transformation, TransformationType type = TransformationType::Global) { + MatrixTransformation2D* transform(const Math::Matrix3& transformation, TransformationType type = TransformationType::Global) { setTransformation(type == TransformationType::Global ? transformation*_transformation : _transformation*transformation); return this; } - inline MatrixTransformation2D* resetTransformation() override { + MatrixTransformation2D* resetTransformation() override { setTransformation({}); return this; } @@ -109,7 +109,7 @@ class MatrixTransformation2D: public AbstractTranslationRotationScaling2D { * @copydoc AbstractTranslationRotationScaling2D::translate() * Same as calling transform() with Matrix3::translation(). */ - inline MatrixTransformation2D* translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { + MatrixTransformation2D* translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { transform(Math::Matrix3::translation(vector), type); return this; } @@ -118,7 +118,7 @@ class MatrixTransformation2D: public AbstractTranslationRotationScaling2D { * @copydoc AbstractTranslationRotationScaling2D::rotate() * Same as calling transform() with Matrix3::rotation(). */ - inline MatrixTransformation2D* rotate(Math::Rad angle, TransformationType type = TransformationType::Global) override { + MatrixTransformation2D* rotate(Math::Rad angle, TransformationType type = TransformationType::Global) override { transform(Math::Matrix3::rotation(angle), type); return this; } @@ -127,7 +127,7 @@ class MatrixTransformation2D: public AbstractTranslationRotationScaling2D { * @copydoc AbstractTranslationRotationScaling2D::scale() * Same as calling transform() with Matrix3::scaling(). */ - inline MatrixTransformation2D* scale(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { + MatrixTransformation2D* scale(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { transform(Math::Matrix3::scaling(vector), type); return this; } @@ -141,7 +141,7 @@ class MatrixTransformation2D: public AbstractTranslationRotationScaling2D { * * Same as calling transform() with Matrix3::reflection(). */ - inline MatrixTransformation2D* reflect(const Math::Vector2& normal, TransformationType type = TransformationType::Global) { + MatrixTransformation2D* reflect(const Math::Vector2& normal, TransformationType type = TransformationType::Global) { transform(Math::Matrix3::reflection(normal), type); return this; } @@ -152,14 +152,14 @@ class MatrixTransformation2D: public AbstractTranslationRotationScaling2D { * if you want to move it above all. * @return Pointer to self (for method chaining) */ - inline MatrixTransformation2D* move(Object>* under) { + MatrixTransformation2D* move(Object>* under) { static_cast*>(this)->Containers::template LinkedList>>::move(this, under); return this; } protected: /* Allow construction only from Object */ - inline explicit MatrixTransformation2D() = default; + explicit MatrixTransformation2D() = default; private: Math::Matrix3 _transformation; diff --git a/src/SceneGraph/MatrixTransformation3D.h b/src/SceneGraph/MatrixTransformation3D.h index 08a36bd77..08c42853c 100644 --- a/src/SceneGraph/MatrixTransformation3D.h +++ b/src/SceneGraph/MatrixTransformation3D.h @@ -51,23 +51,23 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { typedef Math::Matrix4 DataType; #ifndef DOXYGEN_GENERATING_OUTPUT - inline constexpr static Math::Matrix4 fromMatrix(const Math::Matrix4& matrix) { + constexpr static Math::Matrix4 fromMatrix(const Math::Matrix4& matrix) { return matrix; } - inline constexpr static Math::Matrix4 toMatrix(const Math::Matrix4& transformation) { + constexpr static Math::Matrix4 toMatrix(const Math::Matrix4& transformation) { return transformation; } - inline static Math::Matrix4 compose(const Math::Matrix4& parent, const Math::Matrix4& child) { + static Math::Matrix4 compose(const Math::Matrix4& parent, const Math::Matrix4& child) { return parent*child; } - inline static Math::Matrix4 inverted(const Math::Matrix4& transformation) { + static Math::Matrix4 inverted(const Math::Matrix4& transformation) { return transformation.inverted(); } - inline Math::Matrix4 transformation() const { + Math::Matrix4 transformation() const { return _transformation; } #endif @@ -88,7 +88,7 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { return this; } - inline MatrixTransformation3D* resetTransformation() override { + MatrixTransformation3D* resetTransformation() override { setTransformation({}); return this; } @@ -99,7 +99,7 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { * @param type Transformation type * @return Pointer to self (for method chaining) */ - inline MatrixTransformation3D* transform(const Math::Matrix4& transformation, TransformationType type = TransformationType::Global) { + MatrixTransformation3D* transform(const Math::Matrix4& transformation, TransformationType type = TransformationType::Global) { setTransformation(type == TransformationType::Global ? transformation*_transformation : _transformation*transformation); return this; @@ -109,7 +109,7 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { * @copydoc AbstractTranslationRotationScaling3D::translate() * Same as calling transform() with Matrix4::translation(). */ - inline MatrixTransformation3D* translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { + MatrixTransformation3D* translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { transform(Math::Matrix4::translation(vector), type); return this; } @@ -118,7 +118,7 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { * @copydoc AbstractTranslationRotationScaling3D::rotate() * Same as calling transform() with Matrix4::rotation(). */ - inline MatrixTransformation3D* rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) override { + MatrixTransformation3D* rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) override { transform(Math::Matrix4::rotation(angle, normalizedAxis), type); return this; } @@ -131,7 +131,7 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { * * Same as calling transform() with Matrix4::rotationX(). */ - inline MatrixTransformation3D* rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) override { + MatrixTransformation3D* rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) override { transform(Math::Matrix4::rotationX(angle), type); return this; } @@ -144,7 +144,7 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { * * Same as calling transform() with Matrix4::rotationY(). */ - inline MatrixTransformation3D* rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) override { + MatrixTransformation3D* rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) override { transform(Math::Matrix4::rotationY(angle), type); return this; } @@ -157,7 +157,7 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { * * Same as calling transform() with Matrix4::rotationZ(). */ - inline MatrixTransformation3D* rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) override { + MatrixTransformation3D* rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) override { transform(Math::Matrix4::rotationZ(angle), type); return this; } @@ -166,7 +166,7 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { * @copydoc AbstractTranslationRotationScaling3D::scale() * Same as calling transform() with Matrix4::scaling(). */ - inline MatrixTransformation3D* scale(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { + MatrixTransformation3D* scale(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { transform(Math::Matrix4::scaling(vector), type); return this; } @@ -180,14 +180,14 @@ class MatrixTransformation3D: public AbstractTranslationRotationScaling3D { * * Same as calling transform() with Matrix4::reflection(). */ - inline MatrixTransformation3D* reflect(const Math::Vector3& normal, TransformationType type = TransformationType::Global) { + MatrixTransformation3D* reflect(const Math::Vector3& normal, TransformationType type = TransformationType::Global) { transform(Math::Matrix4::reflection(normal), type); return this; } protected: /* Allow construction only from Object */ - inline explicit MatrixTransformation3D() = default; + explicit MatrixTransformation3D() = default; private: Math::Matrix4 _transformation; diff --git a/src/SceneGraph/Object.h b/src/SceneGraph/Object.h index d58ca702c..8757c8ab6 100644 --- a/src/SceneGraph/Object.h +++ b/src/SceneGraph/Object.h @@ -117,7 +117,7 @@ template class MAGNUM_SCENEGRAPH_EXPORT Object: public Abs * @brief Constructor * @param parent Parent object */ - inline explicit Object(Object* parent = nullptr): counter(0xFFFFu), flags(Flag::Dirty) { + explicit Object(Object* parent = nullptr): counter(0xFFFFu), flags(Flag::Dirty) { setParent(parent); } @@ -127,7 +127,7 @@ template class MAGNUM_SCENEGRAPH_EXPORT Object: public Abs * Removes itself from parent's children list and destroys all own * children. */ - inline virtual ~Object() {} + virtual ~Object() {} /** * @{ @name Scene hierarchy @@ -136,7 +136,7 @@ template class MAGNUM_SCENEGRAPH_EXPORT Object: public Abs */ /** @brief Whether this object is scene */ - virtual inline bool isScene() const { return false; } + virtual bool isScene() const { return false; } /** * @brief %Scene @@ -148,57 +148,57 @@ template class MAGNUM_SCENEGRAPH_EXPORT Object: public Abs const Scene* scene() const; /** @brief Parent object or `nullptr`, if this is root object */ - inline Object* parent() { + Object* parent() { return Containers::LinkedListItem, Object>::list(); } /** @overload */ - inline const Object* parent() const { + const Object* parent() const { return Containers::LinkedListItem, Object>::list(); } /** @brief Previous sibling object or `nullptr`, if this is first object */ - inline Object* previousSibling() { + Object* previousSibling() { return Containers::LinkedListItem, Object>::previous(); } /** @overload */ - inline const Object* previousSibling() const { + const Object* previousSibling() const { return Containers::LinkedListItem, Object>::previous(); } /** @brief Next sibling object or `nullptr`, if this is last object */ - inline Object* nextSibling() { + Object* nextSibling() { return Containers::LinkedListItem, Object>::next(); } /** @overload */ - inline const Object* nextSibling() const { + const Object* nextSibling() const { return Containers::LinkedListItem, Object>::next(); } /** @brief Whether this object has children */ - inline bool hasChildren() const { + bool hasChildren() const { return !Containers::LinkedList>::isEmpty(); } /** @brief First child object or `nullptr`, if this object has no children */ - inline Object* firstChild() { + Object* firstChild() { return Containers::LinkedList>::first(); } /** @overload */ - inline const Object* firstChild() const { + const Object* firstChild() const { return Containers::LinkedList>::first(); } /** @brief Last child object or `nullptr`, if this object has no children */ - inline Object* lastChild() { + Object* lastChild() { return Containers::LinkedList>::last(); } /** @overload */ - inline const Object* lastChild() const { + const Object* lastChild() const { return Containers::LinkedList>::last(); } @@ -223,11 +223,11 @@ template class MAGNUM_SCENEGRAPH_EXPORT Object: public Abs /** @{ @name Object transformation */ - inline typename DimensionTraits::MatrixType transformationMatrix() const override { + typename DimensionTraits::MatrixType transformationMatrix() const override { return Transformation::toMatrix(Transformation::transformation()); } - inline typename DimensionTraits::MatrixType absoluteTransformationMatrix() const override { + typename DimensionTraits::MatrixType absoluteTransformationMatrix() const override { return Transformation::toMatrix(absoluteTransformation()); } @@ -251,7 +251,7 @@ template class MAGNUM_SCENEGRAPH_EXPORT Object: public Abs /*@}*/ - inline bool isDirty() const override { return !!(flags & Flag::Dirty); } + bool isDirty() const override { return !!(flags & Flag::Dirty); } void setDirty() override; void setClean() override; diff --git a/src/SceneGraph/Object.hpp b/src/SceneGraph/Object.hpp index 246a20cf7..afd86f07c 100644 --- a/src/SceneGraph/Object.hpp +++ b/src/SceneGraph/Object.hpp @@ -41,8 +41,8 @@ namespace Magnum { namespace SceneGraph { template AbstractObject::AbstractObject() {} template AbstractObject::~AbstractObject() {} -template inline AbstractTransformation::AbstractTransformation() {} -template inline AbstractTransformation::~AbstractTransformation() {} +template AbstractTransformation::AbstractTransformation() {} +template AbstractTransformation::~AbstractTransformation() {} template Scene* Object::scene() { return static_cast*>(sceneObject()); diff --git a/src/SceneGraph/RigidMatrixTransformation2D.h b/src/SceneGraph/RigidMatrixTransformation2D.h index c73c42c96..0dc794349 100644 --- a/src/SceneGraph/RigidMatrixTransformation2D.h +++ b/src/SceneGraph/RigidMatrixTransformation2D.h @@ -54,25 +54,25 @@ class RigidMatrixTransformation2D: public AbstractTranslationRotation2D { typedef Math::Matrix3 DataType; #ifndef DOXYGEN_GENERATING_OUTPUT - inline static Math::Matrix3 fromMatrix(const Math::Matrix3& matrix) { + static Math::Matrix3 fromMatrix(const Math::Matrix3& matrix) { CORRADE_ASSERT(matrix.isRigidTransformation(), "SceneGraph::RigidMatrixTransformation2D::fromMatrix(): the matrix doesn't represent rigid transformation", {}); return matrix; } - inline constexpr static Math::Matrix3 toMatrix(const Math::Matrix3& transformation) { + constexpr static Math::Matrix3 toMatrix(const Math::Matrix3& transformation) { return transformation; } - inline static Math::Matrix3 compose(const Math::Matrix3& parent, const Math::Matrix3& child) { + static Math::Matrix3 compose(const Math::Matrix3& parent, const Math::Matrix3& child) { return parent*child; } - inline static Math::Matrix3 inverted(const Math::Matrix3& transformation) { + static Math::Matrix3 inverted(const Math::Matrix3& transformation) { return transformation.invertedRigid(); } - inline Math::Matrix3 transformation() const { + Math::Matrix3 transformation() const { return _transformation; } #endif @@ -105,7 +105,7 @@ class RigidMatrixTransformation2D: public AbstractTranslationRotation2D { return this; } - inline RigidMatrixTransformation2D* resetTransformation() override { + RigidMatrixTransformation2D* resetTransformation() override { setTransformationInternal({}); return this; } @@ -119,7 +119,7 @@ class RigidMatrixTransformation2D: public AbstractTranslationRotation2D { * Expects that the matrix represents rigid transformation. * @see Matrix3::isRigidTransformation() */ - inline RigidMatrixTransformation2D* transform(const Math::Matrix3& transformation, TransformationType type = TransformationType::Global) { + RigidMatrixTransformation2D* transform(const Math::Matrix3& transformation, TransformationType type = TransformationType::Global) { CORRADE_ASSERT(transformation.isRigidTransformation(), "SceneGraph::RigidMatrixTransformation2D::transform(): the matrix doesn't represent rigid transformation", this); transformInternal(transformation, type); @@ -130,7 +130,7 @@ class RigidMatrixTransformation2D: public AbstractTranslationRotation2D { * @copydoc AbstractTranslationRotationScaling2D::translate() * Same as calling transform() with Matrix3::translation(). */ - inline RigidMatrixTransformation2D* translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { + RigidMatrixTransformation2D* translate(const Math::Vector2& vector, TransformationType type = TransformationType::Global) override { transformInternal(Math::Matrix3::translation(vector), type); return this; } @@ -144,7 +144,7 @@ class RigidMatrixTransformation2D: public AbstractTranslationRotation2D { * Same as calling transform() with Matrix3::rotation(). * @see normalizeRotation() */ - inline RigidMatrixTransformation2D* rotate(Math::Rad angle, TransformationType type = TransformationType::Global) override { + RigidMatrixTransformation2D* rotate(Math::Rad angle, TransformationType type = TransformationType::Global) override { transformInternal(Math::Matrix3::rotation(angle), type); return this; } @@ -158,7 +158,7 @@ class RigidMatrixTransformation2D: public AbstractTranslationRotation2D { * * Same as calling transform() with Matrix3::reflection(). */ - inline RigidMatrixTransformation2D* reflect(const Math::Vector2& normal, TransformationType type = TransformationType::Global) { + RigidMatrixTransformation2D* reflect(const Math::Vector2& normal, TransformationType type = TransformationType::Global) { transformInternal(Math::Matrix3::reflection(normal), type); return this; } @@ -169,18 +169,18 @@ class RigidMatrixTransformation2D: public AbstractTranslationRotation2D { * if you want to move it above all. * @return Pointer to self (for method chaining) */ - inline RigidMatrixTransformation2D* move(Object>* under) { + RigidMatrixTransformation2D* move(Object>* under) { static_cast*>(this)->Containers::template LinkedList>>::move(this, under); return this; } protected: /* Allow construction only from Object */ - inline explicit RigidMatrixTransformation2D() = default; + explicit RigidMatrixTransformation2D() = default; private: /* No assertions fired, for internal use */ - inline void setTransformationInternal(const Math::Matrix3& transformation) { + void setTransformationInternal(const Math::Matrix3& transformation) { /* Setting transformation is forbidden for the scene */ /** @todo Assert for this? */ /** @todo Do this in some common code so we don't need to include Object? */ @@ -191,7 +191,7 @@ class RigidMatrixTransformation2D: public AbstractTranslationRotation2D { } /* No assertions fired, for internal use */ - inline void transformInternal(const Math::Matrix3& transformation, TransformationType type) { + void transformInternal(const Math::Matrix3& transformation, TransformationType type) { setTransformation(type == TransformationType::Global ? transformation*_transformation : _transformation*transformation); } diff --git a/src/SceneGraph/RigidMatrixTransformation3D.h b/src/SceneGraph/RigidMatrixTransformation3D.h index 9757b2271..7ca937c71 100644 --- a/src/SceneGraph/RigidMatrixTransformation3D.h +++ b/src/SceneGraph/RigidMatrixTransformation3D.h @@ -54,25 +54,25 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { typedef Math::Matrix4 DataType; #ifndef DOXYGEN_GENERATING_OUTPUT - inline static Math::Matrix4 fromMatrix(const Math::Matrix4& matrix) { + static Math::Matrix4 fromMatrix(const Math::Matrix4& matrix) { CORRADE_ASSERT(matrix.isRigidTransformation(), "SceneGraph::RigidMatrixTransformation3D::fromMatrix(): the matrix doesn't represent rigid transformation", {}); return matrix; } - inline constexpr static Math::Matrix4 toMatrix(const Math::Matrix4& transformation) { + constexpr static Math::Matrix4 toMatrix(const Math::Matrix4& transformation) { return transformation; } - inline static Math::Matrix4 compose(const Math::Matrix4& parent, const Math::Matrix4& child) { + static Math::Matrix4 compose(const Math::Matrix4& parent, const Math::Matrix4& child) { return parent*child; } - inline static Math::Matrix4 inverted(const Math::Matrix4& transformation) { + static Math::Matrix4 inverted(const Math::Matrix4& transformation) { return transformation.invertedRigid(); } - inline Math::Matrix4 transformation() const { + Math::Matrix4 transformation() const { return _transformation; } #endif @@ -105,7 +105,7 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { return this; } - inline RigidMatrixTransformation3D* resetTransformation() override { + RigidMatrixTransformation3D* resetTransformation() override { setTransformation({}); return this; } @@ -119,7 +119,7 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { * Expects that the matrix represents rigid transformation. * @see Matrix4::isRigidTransformation() */ - inline RigidMatrixTransformation3D* transform(const Math::Matrix4& transformation, TransformationType type = TransformationType::Global) { + RigidMatrixTransformation3D* transform(const Math::Matrix4& transformation, TransformationType type = TransformationType::Global) { CORRADE_ASSERT(transformation.isRigidTransformation(), "SceneGraph::RigidMatrixTransformation3D::transform(): the matrix doesn't represent rigid transformation", this); transformInternal(transformation, type); @@ -130,7 +130,7 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { * @copydoc AbstractTranslationRotationScaling3D::translate() * Same as calling transform() with Matrix4::translation(). */ - inline RigidMatrixTransformation3D* translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { + RigidMatrixTransformation3D* translate(const Math::Vector3& vector, TransformationType type = TransformationType::Global) override { transformInternal(Math::Matrix4::translation(vector), type); return this; } @@ -146,7 +146,7 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { * @see rotateX(), rotateY(), rotateZ(), Vector3::xAxis(), * Vector3::yAxis(), Vector3::zAxis(), normalizeRotation() */ - inline RigidMatrixTransformation3D* rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) override { + RigidMatrixTransformation3D* rotate(Math::Rad angle, const Math::Vector3& normalizedAxis, TransformationType type = TransformationType::Global) override { transformInternal(Math::Matrix4::rotation(angle, normalizedAxis), type); return this; } @@ -160,7 +160,7 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { * Same as calling transform() with Matrix4::rotationX(). * @see normalizeRotation() */ - inline RigidMatrixTransformation3D* rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) override { + RigidMatrixTransformation3D* rotateX(Math::Rad angle, TransformationType type = TransformationType::Global) override { transformInternal(Math::Matrix4::rotationX(angle), type); return this; } @@ -174,7 +174,7 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { * Same as calling transform() with Matrix4::rotationY(). * @see normalizeRotation() */ - inline RigidMatrixTransformation3D* rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) override { + RigidMatrixTransformation3D* rotateY(Math::Rad angle, TransformationType type = TransformationType::Global) override { transformInternal(Math::Matrix4::rotationY(angle), type); return this; } @@ -188,7 +188,7 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { * Same as calling transform() with Matrix4::rotationZ(). * @see normalizeRotation() */ - inline RigidMatrixTransformation3D* rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) override { + RigidMatrixTransformation3D* rotateZ(Math::Rad angle, TransformationType type = TransformationType::Global) override { transformInternal(Math::Matrix4::rotationZ(angle), type); return this; } @@ -202,18 +202,18 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { * * Same as calling transform() with Matrix4::reflection(). */ - inline RigidMatrixTransformation3D* reflect(const Math::Vector3& normal, TransformationType type = TransformationType::Global) { + RigidMatrixTransformation3D* reflect(const Math::Vector3& normal, TransformationType type = TransformationType::Global) { transformInternal(Math::Matrix4::reflection(normal), type); return this; } protected: /* Allow construction only from Object */ - inline explicit RigidMatrixTransformation3D() = default; + explicit RigidMatrixTransformation3D() = default; private: /* No assertions fired, for internal use */ - inline void setTransformationInternal(const Math::Matrix4& transformation) { + void setTransformationInternal(const Math::Matrix4& transformation) { /* Setting transformation is forbidden for the scene */ /** @todo Assert for this? */ /** @todo Do this in some common code so we don't need to include Object? */ @@ -224,7 +224,7 @@ class RigidMatrixTransformation3D: public AbstractTranslationRotation3D { } /* No assertions fired, for internal use */ - inline void transformInternal(const Math::Matrix4& transformation, TransformationType type) { + void transformInternal(const Math::Matrix4& transformation, TransformationType type) { setTransformation(type == TransformationType::Global ? transformation*_transformation : _transformation*transformation); } diff --git a/src/SceneGraph/Scene.h b/src/SceneGraph/Scene.h index 2ba3a552e..42ae1d2e1 100644 --- a/src/SceneGraph/Scene.h +++ b/src/SceneGraph/Scene.h @@ -42,7 +42,7 @@ template class Scene: public Object { public: explicit Scene() = default; - inline bool isScene() const { return true; } + bool isScene() const { return true; } }; }} diff --git a/src/SceneGraph/Test/CameraTest.cpp b/src/SceneGraph/Test/CameraTest.cpp index 189ac777f..c31da6842 100644 --- a/src/SceneGraph/Test/CameraTest.cpp +++ b/src/SceneGraph/Test/CameraTest.cpp @@ -160,7 +160,7 @@ void CameraTest::projectionSizeViewport() { void CameraTest::draw() { class Drawable: public SceneGraph::Drawable<3> { public: - inline Drawable(AbstractObject<3>* object, DrawableGroup<3>* group, Matrix4& result): SceneGraph::Drawable<3>(object, group), result(result) {} + Drawable(AbstractObject<3>* object, DrawableGroup<3>* group, Matrix4& result): SceneGraph::Drawable<3>(object, group), result(result) {} protected: void draw(const Matrix4& transformationMatrix, AbstractCamera<3>*) { diff --git a/src/SceneGraph/Test/ObjectTest.cpp b/src/SceneGraph/Test/ObjectTest.cpp index 74fa38c2b..2ec5848ae 100644 --- a/src/SceneGraph/Test/ObjectTest.cpp +++ b/src/SceneGraph/Test/ObjectTest.cpp @@ -52,7 +52,7 @@ typedef SceneGraph::Scene> Scene3D; class CachingObject: public Object3D, AbstractFeature<3> { public: - inline CachingObject(Object3D* parent = nullptr): Object3D(parent), AbstractFeature<3>(this) { + CachingObject(Object3D* parent = nullptr): Object3D(parent), AbstractFeature<3>(this) { setCachedTransformations(CachedTransformation::Absolute); }