Remove unused defaultViewer / defaultViewPoint

pull/2277/head
bzzt 6 years ago committed by Andrei Kortunov
parent e908790584
commit 391f6faffb

@ -312,7 +312,6 @@ namespace MWRender
else
mTerrain.reset(new Terrain::TerrainGrid(sceneRoot, mRootNode, mResourceSystem, mTerrainStorage, Mask_Terrain, Mask_PreCompile, Mask_Debug));
mTerrain->setDefaultViewer(mViewer->getCamera());
mTerrain->setTargetFrameRate(Settings::Manager::getFloat("target framerate", "Cells"));
mTerrain->setWorkQueue(mWorkQueue.get());

@ -154,8 +154,6 @@ ViewData* QuadTreeNode::getView(osg::NodeVisitor &nv, bool& needsUpdate)
else // INTERSECTION_VISITOR
{
osg::Vec3f viewPoint = nv.getViewPoint();
mViewDataMap->getDefaultViewPoint(viewPoint);
static osg::ref_ptr<osg::Object> dummyObj = new osg::DummyObject;
vd = mViewDataMap->getViewData(dummyObj.get(), viewPoint, needsUpdate);
needsUpdate = true;

@ -528,11 +528,6 @@ void QuadTreeWorld::reportStats(unsigned int frameNumber, osg::Stats *stats)
stats->setAttribute(frameNumber, "Composite", mCompositeMapRenderer->getCompileSetSize());
}
void QuadTreeWorld::setDefaultViewer(osg::Object *obj)
{
mViewDataMap->setDefaultViewer(obj);
}
void QuadTreeWorld::loadCell(int x, int y)
{
// fallback behavior only for undefined cells (every other is already handled in quadtree)

@ -42,8 +42,6 @@ namespace Terrain
void reportStats(unsigned int frameNumber, osg::Stats* stats);
virtual void setDefaultViewer(osg::Object* obj);
private:
void ensureQuadTreeBuilt();

@ -195,22 +195,4 @@ void ViewDataMap::clear()
mViewVector.clear();
}
void ViewDataMap::setDefaultViewer(osg::Object *viewer)
{
mDefaultViewer = viewer;
}
bool ViewDataMap::getDefaultViewPoint(osg::Vec3f& viewPoint)
{
Map::const_iterator found = mViews.find(mDefaultViewer);
if (found != mViews.end() && found->second->hasViewPoint())
{
viewPoint = found->second->getViewPoint();
return true;
}
else
return false;
}
}

@ -85,10 +85,6 @@ namespace Terrain
void clear();
void setDefaultViewer(osg::Object* viewer);
bool getDefaultViewPoint(osg::Vec3f& viewPoint);
private:
std::list<ViewData> mViewVector;
@ -99,8 +95,6 @@ namespace Terrain
float mExpiryDelay; // time in seconds for unused view to be removed
std::deque<ViewData*> mUnusedViews;
osg::ref_ptr<osg::Object> mDefaultViewer;
};
}

@ -112,9 +112,6 @@ namespace Terrain
virtual void reportStats(unsigned int frameNumber, osg::Stats* stats) {}
/// Set the default viewer (usually a Camera), used as viewpoint for any viewers that don't use their own viewpoint.
virtual void setDefaultViewer(osg::Object* obj) {}
virtual void setViewDistance(float distance) {}
Storage* getStorage() { return mStorage; }

Loading…
Cancel
Save