forked from teamnwah/openmw-tes3coop
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
4 changed files with 4 additions and 30 deletions
|
@ -75,8 +75,7 @@ void CSVRender::Cell::recreatePathgrid()
|
||||||
if (pathgridIndex != -1)
|
if (pathgridIndex != -1)
|
||||||
{
|
{
|
||||||
mPathgridGeode->removeDrawable(mPathgridGeometry);
|
mPathgridGeode->removeDrawable(mPathgridGeometry);
|
||||||
mPathgridGeometry = SceneUtil::PathgridGeometryFactory::get().create(
|
mPathgridGeometry = SceneUtil::createPathgridGeometry(pathgrids.getRecord(pathgridIndex).get());
|
||||||
pathgrids.getRecord(pathgridIndex).get());
|
|
||||||
mPathgridGeode->addDrawable(mPathgridGeometry);
|
mPathgridGeode->addDrawable(mPathgridGeometry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ void Pathgrid::enableCellPathgrid(const MWWorld::CellStore *store)
|
||||||
osg::ref_ptr<osg::PositionAttitudeTransform> cellPathGrid = new osg::PositionAttitudeTransform;
|
osg::ref_ptr<osg::PositionAttitudeTransform> cellPathGrid = new osg::PositionAttitudeTransform;
|
||||||
cellPathGrid->setPosition(cellPathGridPos);
|
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);
|
cellPathGrid->addChild(geometry);
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace SceneUtil
|
||||||
|
|
||||||
const osg::Vec4f DiamondEdgeColor = osg::Vec4f(0.5f, 1.f, 1.f, 1.f);
|
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 unsigned short PointCount = static_cast<unsigned short>(pathgrid.mPoints.size());
|
||||||
const size_t EdgeCount = pathgrid.mEdges.size();
|
const size_t EdgeCount = pathgrid.mEdges.size();
|
||||||
|
@ -155,14 +155,4 @@ namespace SceneUtil
|
||||||
|
|
||||||
return gridGeometry;
|
return gridGeometry;
|
||||||
}
|
}
|
||||||
|
|
||||||
PathgridGeometryFactory& PathgridGeometryFactory::get()
|
|
||||||
{
|
|
||||||
static PathgridGeometryFactory instance;
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
PathgridGeometryFactory::PathgridGeometryFactory()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,22 +11,7 @@ namespace ESM
|
||||||
|
|
||||||
namespace SceneUtil
|
namespace SceneUtil
|
||||||
{
|
{
|
||||||
|
osg::ref_ptr<osg::Geometry> createPathgridGeometry(const ESM::Pathgrid& pathgrid);
|
||||||
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&);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue