From 6fb62b9604bd8eda2167fc73945accc6cb714fa6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 6 Jun 2008 13:21:57 +0000 Subject: [PATCH] Renamed _rendergraph to _stateGraph to better reflect its function --- include/osgUtil/SceneView | 24 ++++++++++++------------ src/osgUtil/SceneView.cpp | 22 +++++++++++----------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/osgUtil/SceneView b/include/osgUtil/SceneView index 241cbd3ab..789e94e81 100644 --- a/include/osgUtil/SceneView +++ b/include/osgUtil/SceneView @@ -286,17 +286,17 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings const osg::CollectOccludersVisitor* getCollectOccludersVisitor() const { return _collectOccludersVisitor.get(); } - void setStateGraph(osgUtil::StateGraph* rg) { _rendergraph = rg; } - osgUtil::StateGraph* getStateGraph() { return _rendergraph.get(); } - const osgUtil::StateGraph* getStateGraph() const { return _rendergraph.get(); } + void setStateGraph(osgUtil::StateGraph* rg) { _stateGraph = rg; } + osgUtil::StateGraph* getStateGraph() { return _stateGraph.get(); } + const osgUtil::StateGraph* getStateGraph() const { return _stateGraph.get(); } - void setStateGraphLeft(osgUtil::StateGraph* rg) { _rendergraphLeft = rg; } - osgUtil::StateGraph* getStateGraphLeft() { return _rendergraphLeft.get(); } - const osgUtil::StateGraph* getStateGraphLeft() const { return _rendergraphLeft.get(); } + void setStateGraphLeft(osgUtil::StateGraph* rg) { _stateGraphLeft = rg; } + osgUtil::StateGraph* getStateGraphLeft() { return _stateGraphLeft.get(); } + const osgUtil::StateGraph* getStateGraphLeft() const { return _stateGraphLeft.get(); } - void setStateGraphRight(osgUtil::StateGraph* rg) { _rendergraphRight = rg; } - osgUtil::StateGraph* getStateGraphRight() { return _rendergraphRight.get(); } - const osgUtil::StateGraph* getStateGraphRight() const { return _rendergraphRight.get(); } + void setStateGraphRight(osgUtil::StateGraph* rg) { _stateGraphRight = rg; } + osgUtil::StateGraph* getStateGraphRight() { return _stateGraphRight.get(); } + const osgUtil::StateGraph* getStateGraphRight() const { return _stateGraphRight.get(); } void setRenderStage(osgUtil::RenderStage* rs) { _renderStage = rs; } @@ -488,17 +488,17 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings osg::ref_ptr _initVisitor; osg::ref_ptr _updateVisitor; osg::ref_ptr _cullVisitor; - osg::ref_ptr _rendergraph; + osg::ref_ptr _stateGraph; osg::ref_ptr _renderStage; osg::ref_ptr _computeStereoMatricesCallback; osg::ref_ptr _cullVisitorLeft; - osg::ref_ptr _rendergraphLeft; + osg::ref_ptr _stateGraphLeft; osg::ref_ptr _renderStageLeft; osg::ref_ptr _cullVisitorRight; - osg::ref_ptr _rendergraphRight; + osg::ref_ptr _stateGraphRight; osg::ref_ptr _renderStageRight; osg::ref_ptr _collectOccludersVisitor; diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index a749cff28..66be9dbdf 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -228,7 +228,7 @@ void SceneView::setDefaults(unsigned int options) _renderInfo.setState(new State); - _rendergraph = new StateGraph; + _stateGraph = new StateGraph; _renderStage = new RenderStage; @@ -256,7 +256,7 @@ void SceneView::setDefaults(unsigned int options) _cullVisitor = CullVisitor::create(); - _cullVisitor->setStateGraph(_rendergraph.get()); + _cullVisitor->setStateGraph(_stateGraph.get()); _cullVisitor->setRenderStage(_renderStage.get()); _globalStateSet->setGlobalDefaults(); @@ -605,10 +605,10 @@ void SceneView::cull() osg::notify(osg::INFO) << "Warning: no valid osgUtil::SceneView:: attached, creating a default CullVisitor automatically."<< std::endl; _cullVisitor = CullVisitor::create(); } - if (!_rendergraph) + if (!_stateGraph) { osg::notify(osg::INFO) << "Warning: no valid osgUtil::SceneView:: attached, creating a global default StateGraph automatically."<< std::endl; - _rendergraph = new StateGraph; + _stateGraph = new StateGraph; } if (!_renderStage) { @@ -623,7 +623,7 @@ void SceneView::cull() { // set up the left eye. _cullVisitor->setTraversalMask(_cullMaskLeft); - bool computeNearFar = cullStage(computeLeftEyeProjection(getProjectionMatrix()),computeLeftEyeView(getViewMatrix()),_cullVisitor.get(),_rendergraph.get(),_renderStage.get()); + bool computeNearFar = cullStage(computeLeftEyeProjection(getProjectionMatrix()),computeLeftEyeView(getViewMatrix()),_cullVisitor.get(),_stateGraph.get(),_renderStage.get()); if (computeNearFar) { @@ -637,7 +637,7 @@ void SceneView::cull() { // set up the right eye. _cullVisitor->setTraversalMask(_cullMaskRight); - bool computeNearFar = cullStage(computeRightEyeProjection(getProjectionMatrix()),computeRightEyeView(getViewMatrix()),_cullVisitor.get(),_rendergraph.get(),_renderStage.get()); + bool computeNearFar = cullStage(computeRightEyeProjection(getProjectionMatrix()),computeRightEyeView(getViewMatrix()),_cullVisitor.get(),_stateGraph.get(),_renderStage.get()); if (computeNearFar) { @@ -651,24 +651,24 @@ void SceneView::cull() { if (!_cullVisitorLeft.valid()) _cullVisitorLeft = dynamic_cast(_cullVisitor->clone()); - if (!_rendergraphLeft.valid()) _rendergraphLeft = dynamic_cast(_rendergraph->cloneType()); + if (!_stateGraphLeft.valid()) _stateGraphLeft = dynamic_cast(_stateGraph->cloneType()); if (!_renderStageLeft.valid()) _renderStageLeft = dynamic_cast(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL)); if (!_cullVisitorRight.valid()) _cullVisitorRight = dynamic_cast(_cullVisitor->clone()); - if (!_rendergraphRight.valid()) _rendergraphRight = dynamic_cast(_rendergraph->cloneType()); + if (!_stateGraphRight.valid()) _stateGraphRight = dynamic_cast(_stateGraph->cloneType()); if (!_renderStageRight.valid()) _renderStageRight = dynamic_cast(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL)); _cullVisitorLeft->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler()); _cullVisitorLeft->setClampProjectionMatrixCallback(_cullVisitor->getClampProjectionMatrixCallback()); _cullVisitorLeft->setTraversalMask(_cullMaskLeft); - bool computeNearFar = cullStage(computeLeftEyeProjection(getProjectionMatrix()),computeLeftEyeView(getViewMatrix()),_cullVisitorLeft.get(),_rendergraphLeft.get(),_renderStageLeft.get()); + bool computeNearFar = cullStage(computeLeftEyeProjection(getProjectionMatrix()),computeLeftEyeView(getViewMatrix()),_cullVisitorLeft.get(),_stateGraphLeft.get(),_renderStageLeft.get()); // set up the right eye. _cullVisitorRight->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler()); _cullVisitorRight->setClampProjectionMatrixCallback(_cullVisitor->getClampProjectionMatrixCallback()); _cullVisitorRight->setTraversalMask(_cullMaskRight); - computeNearFar = cullStage(computeRightEyeProjection(getProjectionMatrix()),computeRightEyeView(getViewMatrix()),_cullVisitorRight.get(),_rendergraphRight.get(),_renderStageRight.get()); + computeNearFar = cullStage(computeRightEyeProjection(getProjectionMatrix()),computeRightEyeView(getViewMatrix()),_cullVisitorRight.get(),_stateGraphRight.get(),_renderStageRight.get()); if (computeNearFar) { @@ -684,7 +684,7 @@ void SceneView::cull() { _cullVisitor->setTraversalMask(_cullMask); - bool computeNearFar = cullStage(getProjectionMatrix(),getViewMatrix(),_cullVisitor.get(),_rendergraph.get(),_renderStage.get()); + bool computeNearFar = cullStage(getProjectionMatrix(),getViewMatrix(),_cullVisitor.get(),_stateGraph.get(),_renderStage.get()); if (computeNearFar) {