diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index bdefe4c5cb..976635cb4d 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -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()); diff --git a/components/terrain/quadtreenode.cpp b/components/terrain/quadtreenode.cpp index d9fd4cd458..141803cf76 100644 --- a/components/terrain/quadtreenode.cpp +++ b/components/terrain/quadtreenode.cpp @@ -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 dummyObj = new osg::DummyObject; vd = mViewDataMap->getViewData(dummyObj.get(), viewPoint, needsUpdate); needsUpdate = true; diff --git a/components/terrain/quadtreeworld.cpp b/components/terrain/quadtreeworld.cpp index b273348814..499e268dc7 100644 --- a/components/terrain/quadtreeworld.cpp +++ b/components/terrain/quadtreeworld.cpp @@ -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) diff --git a/components/terrain/quadtreeworld.hpp b/components/terrain/quadtreeworld.hpp index 0c2296b240..349f27b647 100644 --- a/components/terrain/quadtreeworld.hpp +++ b/components/terrain/quadtreeworld.hpp @@ -42,8 +42,6 @@ namespace Terrain void reportStats(unsigned int frameNumber, osg::Stats* stats); - virtual void setDefaultViewer(osg::Object* obj); - private: void ensureQuadTreeBuilt(); diff --git a/components/terrain/viewdata.cpp b/components/terrain/viewdata.cpp index 3185d840d8..d1870abaaf 100644 --- a/components/terrain/viewdata.cpp +++ b/components/terrain/viewdata.cpp @@ -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; -} - - } diff --git a/components/terrain/viewdata.hpp b/components/terrain/viewdata.hpp index abbf5ff7fa..0016276409 100644 --- a/components/terrain/viewdata.hpp +++ b/components/terrain/viewdata.hpp @@ -85,10 +85,6 @@ namespace Terrain void clear(); - void setDefaultViewer(osg::Object* viewer); - - bool getDefaultViewPoint(osg::Vec3f& viewPoint); - private: std::list mViewVector; @@ -99,8 +95,6 @@ namespace Terrain float mExpiryDelay; // time in seconds for unused view to be removed std::deque mUnusedViews; - - osg::ref_ptr mDefaultViewer; }; } diff --git a/components/terrain/world.hpp b/components/terrain/world.hpp index e0de69eeee..0402b8197f 100644 --- a/components/terrain/world.hpp +++ b/components/terrain/world.hpp @@ -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; }