mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Remove now unnecessary factory class.
It was originally used for storing normals, but that functionality was removed.
This commit is contained in:
parent
1f902ff069
commit
14ae232938
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ void Pathgrid::enableCellPathgrid(const MWWorld::CellStore *store)
|
||||
osg::ref_ptr<osg::PositionAttitudeTransform> cellPathGrid = new osg::PositionAttitudeTransform;
|
||||
cellPathGrid->setPosition(cellPathGridPos);
|
||||
|
||||
osg::ref_ptr<osg::Geometry> geometry = SceneUtil::PathgridGeometryFactory::get().create(*pathgrid);
|
||||
osg::ref_ptr<osg::Geometry> geometry = SceneUtil::createPathgridGeometry(*pathgrid);
|
||||
|
||||
cellPathGrid->addChild(geometry);
|
||||
|
||||
|
@ -56,7 +56,7 @@ namespace SceneUtil
|
||||
|
||||
const osg::Vec4f DiamondEdgeColor = osg::Vec4f(0.5f, 1.f, 1.f, 1.f);
|
||||
|
||||
osg::ref_ptr<osg::Geometry> PathgridGeometryFactory::create(const ESM::Pathgrid& pathgrid)
|
||||
osg::ref_ptr<osg::Geometry> createPathgridGeometry(const ESM::Pathgrid& pathgrid)
|
||||
{
|
||||
const unsigned short PointCount = static_cast<unsigned short>(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()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -11,22 +11,7 @@ namespace ESM
|
||||
|
||||
namespace SceneUtil
|
||||
{
|
||||
|
||||
class PathgridGeometryFactory
|
||||
{
|
||||
public:
|
||||
|
||||
osg::ref_ptr<osg::Geometry> create(const ESM::Pathgrid& pathgrid);
|
||||
static PathgridGeometryFactory& get();
|
||||
|
||||
private:
|
||||
|
||||
PathgridGeometryFactory();
|
||||
|
||||
// Not implemented
|
||||
PathgridGeometryFactory(const PathgridGeometryFactory&);
|
||||
PathgridGeometryFactory& operator=(const PathgridGeometryFactory&);
|
||||
};
|
||||
osg::ref_ptr<osg::Geometry> createPathgridGeometry(const ESM::Pathgrid& pathgrid);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user