diff --git a/apps/opencs/view/render/cell.cpp b/apps/opencs/view/render/cell.cpp index a87451398..691b909bb 100644 --- a/apps/opencs/view/render/cell.cpp +++ b/apps/opencs/view/render/cell.cpp @@ -75,8 +75,7 @@ void CSVRender::Cell::recreatePathgrid() if (pathgridIndex != -1) { mPathgridGeode->removeDrawable(mPathgridGeometry); - mPathgridGeometry = SceneUtil::PathgridGeometryFactory::get().create( - pathgrids.getRecord(pathgridIndex).get()); + mPathgridGeometry = SceneUtil::createPathgridGeometry(pathgrids.getRecord(pathgridIndex).get()); mPathgridGeode->addDrawable(mPathgridGeometry); } } diff --git a/apps/openmw/mwrender/pathgrid.cpp b/apps/openmw/mwrender/pathgrid.cpp index 8d790e5e0..aae97fe35 100644 --- a/apps/openmw/mwrender/pathgrid.cpp +++ b/apps/openmw/mwrender/pathgrid.cpp @@ -112,7 +112,7 @@ void Pathgrid::enableCellPathgrid(const MWWorld::CellStore *store) osg::ref_ptr cellPathGrid = new osg::PositionAttitudeTransform; cellPathGrid->setPosition(cellPathGridPos); - osg::ref_ptr geometry = SceneUtil::PathgridGeometryFactory::get().create(*pathgrid); + osg::ref_ptr geometry = SceneUtil::createPathgridGeometry(*pathgrid); cellPathGrid->addChild(geometry); diff --git a/components/sceneutil/pathgridutil.cpp b/components/sceneutil/pathgridutil.cpp index 37c975dff..5d71efd1e 100644 --- a/components/sceneutil/pathgridutil.cpp +++ b/components/sceneutil/pathgridutil.cpp @@ -56,7 +56,7 @@ namespace SceneUtil const osg::Vec4f DiamondEdgeColor = osg::Vec4f(0.5f, 1.f, 1.f, 1.f); - osg::ref_ptr PathgridGeometryFactory::create(const ESM::Pathgrid& pathgrid) + osg::ref_ptr createPathgridGeometry(const ESM::Pathgrid& pathgrid) { const unsigned short PointCount = static_cast(pathgrid.mPoints.size()); const size_t EdgeCount = pathgrid.mEdges.size(); @@ -155,14 +155,4 @@ namespace SceneUtil return gridGeometry; } - - PathgridGeometryFactory& PathgridGeometryFactory::get() - { - static PathgridGeometryFactory instance; - return instance; - } - - PathgridGeometryFactory::PathgridGeometryFactory() - { - } } diff --git a/components/sceneutil/pathgridutil.hpp b/components/sceneutil/pathgridutil.hpp index 1bb668226..d547bbf3e 100644 --- a/components/sceneutil/pathgridutil.hpp +++ b/components/sceneutil/pathgridutil.hpp @@ -11,22 +11,7 @@ namespace ESM namespace SceneUtil { - - class PathgridGeometryFactory - { - public: - - osg::ref_ptr create(const ESM::Pathgrid& pathgrid); - static PathgridGeometryFactory& get(); - - private: - - PathgridGeometryFactory(); - - // Not implemented - PathgridGeometryFactory(const PathgridGeometryFactory&); - PathgridGeometryFactory& operator=(const PathgridGeometryFactory&); - }; + osg::ref_ptr createPathgridGeometry(const ESM::Pathgrid& pathgrid); } #endif