diff --git a/src/Physics/ObjectShape.cpp b/src/Physics/ObjectShape.cpp index 41469f188..fb1a800fc 100644 --- a/src/Physics/ObjectShape.cpp +++ b/src/Physics/ObjectShape.cpp @@ -30,6 +30,14 @@ template ObjectShape::~ObjectShape() { delete _shape; } +template ObjectShapeGroup* ObjectShape::group() { + return static_cast*>(SceneGraph::AbstractGroupedFeature>::group()); +} + +template const ObjectShapeGroup* ObjectShape::group() const { + return static_cast*>(SceneGraph::AbstractGroupedFeature>::group()); +} + template void ObjectShape::markDirty() { group()->setDirty(); } diff --git a/src/Physics/ObjectShape.h b/src/Physics/ObjectShape.h index 6bba9209e..0f7aa6e31 100644 --- a/src/Physics/ObjectShape.h +++ b/src/Physics/ObjectShape.h @@ -20,7 +20,7 @@ */ #include "SceneGraph/AbstractGroupedFeature.h" -#include "ObjectShapeGroup.h" +#include "Physics/Physics.h" #include "magnumPhysicsVisibility.h" @@ -106,14 +106,8 @@ template class MAGNUM_PHYSICS_EXPORT ObjectShape: publi * * If the shape doesn't belong to any group, returns `nullptr`. */ - inline ObjectShapeGroup* group() { - return static_cast*>(SceneGraph::AbstractGroupedFeature>::group()); - } - - /** @overload */ - inline const ObjectShapeGroup* group() const { - return static_cast*>(SceneGraph::AbstractGroupedFeature>::group()); - } + ObjectShapeGroup* group(); + const ObjectShapeGroup* group() const; /**< @overload */ protected: /** Marks also the group as dirty */ diff --git a/src/Physics/ObjectShapeGroup.h b/src/Physics/ObjectShapeGroup.h index 0553263da..0c864cbb7 100644 --- a/src/Physics/ObjectShapeGroup.h +++ b/src/Physics/ObjectShapeGroup.h @@ -22,8 +22,8 @@ #include #include +#include "Physics/ObjectShape.h" #include "SceneGraph/FeatureGroup.h" -#include "Physics.h" #include "magnumPhysicsVisibility.h" @@ -93,7 +93,4 @@ typedef ObjectShapeGroup<3> ObjectShapeGroup3D; }} -/* Make the definition complete */ -#include "ObjectShape.h" - #endif