Renamed _rendergraph to _stateGraph to better reflect its function

This commit is contained in:
Robert Osfield 2008-06-06 13:21:57 +00:00
parent ed45e32355
commit 6fb62b9604
2 changed files with 23 additions and 23 deletions

View File

@ -286,17 +286,17 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
const osg::CollectOccludersVisitor* getCollectOccludersVisitor() const { return _collectOccludersVisitor.get(); } const osg::CollectOccludersVisitor* getCollectOccludersVisitor() const { return _collectOccludersVisitor.get(); }
void setStateGraph(osgUtil::StateGraph* rg) { _rendergraph = rg; } void setStateGraph(osgUtil::StateGraph* rg) { _stateGraph = rg; }
osgUtil::StateGraph* getStateGraph() { return _rendergraph.get(); } osgUtil::StateGraph* getStateGraph() { return _stateGraph.get(); }
const osgUtil::StateGraph* getStateGraph() const { return _rendergraph.get(); } const osgUtil::StateGraph* getStateGraph() const { return _stateGraph.get(); }
void setStateGraphLeft(osgUtil::StateGraph* rg) { _rendergraphLeft = rg; } void setStateGraphLeft(osgUtil::StateGraph* rg) { _stateGraphLeft = rg; }
osgUtil::StateGraph* getStateGraphLeft() { return _rendergraphLeft.get(); } osgUtil::StateGraph* getStateGraphLeft() { return _stateGraphLeft.get(); }
const osgUtil::StateGraph* getStateGraphLeft() const { return _rendergraphLeft.get(); } const osgUtil::StateGraph* getStateGraphLeft() const { return _stateGraphLeft.get(); }
void setStateGraphRight(osgUtil::StateGraph* rg) { _rendergraphRight = rg; } void setStateGraphRight(osgUtil::StateGraph* rg) { _stateGraphRight = rg; }
osgUtil::StateGraph* getStateGraphRight() { return _rendergraphRight.get(); } osgUtil::StateGraph* getStateGraphRight() { return _stateGraphRight.get(); }
const osgUtil::StateGraph* getStateGraphRight() const { return _rendergraphRight.get(); } const osgUtil::StateGraph* getStateGraphRight() const { return _stateGraphRight.get(); }
void setRenderStage(osgUtil::RenderStage* rs) { _renderStage = rs; } void setRenderStage(osgUtil::RenderStage* rs) { _renderStage = rs; }
@ -488,17 +488,17 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
osg::ref_ptr<osg::NodeVisitor> _initVisitor; osg::ref_ptr<osg::NodeVisitor> _initVisitor;
osg::ref_ptr<osg::NodeVisitor> _updateVisitor; osg::ref_ptr<osg::NodeVisitor> _updateVisitor;
osg::ref_ptr<osgUtil::CullVisitor> _cullVisitor; osg::ref_ptr<osgUtil::CullVisitor> _cullVisitor;
osg::ref_ptr<osgUtil::StateGraph> _rendergraph; osg::ref_ptr<osgUtil::StateGraph> _stateGraph;
osg::ref_ptr<osgUtil::RenderStage> _renderStage; osg::ref_ptr<osgUtil::RenderStage> _renderStage;
osg::ref_ptr<ComputeStereoMatricesCallback> _computeStereoMatricesCallback; osg::ref_ptr<ComputeStereoMatricesCallback> _computeStereoMatricesCallback;
osg::ref_ptr<osgUtil::CullVisitor> _cullVisitorLeft; osg::ref_ptr<osgUtil::CullVisitor> _cullVisitorLeft;
osg::ref_ptr<osgUtil::StateGraph> _rendergraphLeft; osg::ref_ptr<osgUtil::StateGraph> _stateGraphLeft;
osg::ref_ptr<osgUtil::RenderStage> _renderStageLeft; osg::ref_ptr<osgUtil::RenderStage> _renderStageLeft;
osg::ref_ptr<osgUtil::CullVisitor> _cullVisitorRight; osg::ref_ptr<osgUtil::CullVisitor> _cullVisitorRight;
osg::ref_ptr<osgUtil::StateGraph> _rendergraphRight; osg::ref_ptr<osgUtil::StateGraph> _stateGraphRight;
osg::ref_ptr<osgUtil::RenderStage> _renderStageRight; osg::ref_ptr<osgUtil::RenderStage> _renderStageRight;
osg::ref_ptr<osg::CollectOccludersVisitor> _collectOccludersVisitor; osg::ref_ptr<osg::CollectOccludersVisitor> _collectOccludersVisitor;

View File

@ -228,7 +228,7 @@ void SceneView::setDefaults(unsigned int options)
_renderInfo.setState(new State); _renderInfo.setState(new State);
_rendergraph = new StateGraph; _stateGraph = new StateGraph;
_renderStage = new RenderStage; _renderStage = new RenderStage;
@ -256,7 +256,7 @@ void SceneView::setDefaults(unsigned int options)
_cullVisitor = CullVisitor::create(); _cullVisitor = CullVisitor::create();
_cullVisitor->setStateGraph(_rendergraph.get()); _cullVisitor->setStateGraph(_stateGraph.get());
_cullVisitor->setRenderStage(_renderStage.get()); _cullVisitor->setRenderStage(_renderStage.get());
_globalStateSet->setGlobalDefaults(); _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; osg::notify(osg::INFO) << "Warning: no valid osgUtil::SceneView:: attached, creating a default CullVisitor automatically."<< std::endl;
_cullVisitor = CullVisitor::create(); _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; 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) if (!_renderStage)
{ {
@ -623,7 +623,7 @@ void SceneView::cull()
{ {
// set up the left eye. // set up the left eye.
_cullVisitor->setTraversalMask(_cullMaskLeft); _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) if (computeNearFar)
{ {
@ -637,7 +637,7 @@ void SceneView::cull()
{ {
// set up the right eye. // set up the right eye.
_cullVisitor->setTraversalMask(_cullMaskRight); _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) if (computeNearFar)
{ {
@ -651,24 +651,24 @@ void SceneView::cull()
{ {
if (!_cullVisitorLeft.valid()) _cullVisitorLeft = dynamic_cast<CullVisitor*>(_cullVisitor->clone()); if (!_cullVisitorLeft.valid()) _cullVisitorLeft = dynamic_cast<CullVisitor*>(_cullVisitor->clone());
if (!_rendergraphLeft.valid()) _rendergraphLeft = dynamic_cast<StateGraph*>(_rendergraph->cloneType()); if (!_stateGraphLeft.valid()) _stateGraphLeft = dynamic_cast<StateGraph*>(_stateGraph->cloneType());
if (!_renderStageLeft.valid()) _renderStageLeft = dynamic_cast<RenderStage*>(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL)); if (!_renderStageLeft.valid()) _renderStageLeft = dynamic_cast<RenderStage*>(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL));
if (!_cullVisitorRight.valid()) _cullVisitorRight = dynamic_cast<CullVisitor*>(_cullVisitor->clone()); if (!_cullVisitorRight.valid()) _cullVisitorRight = dynamic_cast<CullVisitor*>(_cullVisitor->clone());
if (!_rendergraphRight.valid()) _rendergraphRight = dynamic_cast<StateGraph*>(_rendergraph->cloneType()); if (!_stateGraphRight.valid()) _stateGraphRight = dynamic_cast<StateGraph*>(_stateGraph->cloneType());
if (!_renderStageRight.valid()) _renderStageRight = dynamic_cast<RenderStage*>(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL)); if (!_renderStageRight.valid()) _renderStageRight = dynamic_cast<RenderStage*>(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL));
_cullVisitorLeft->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler()); _cullVisitorLeft->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler());
_cullVisitorLeft->setClampProjectionMatrixCallback(_cullVisitor->getClampProjectionMatrixCallback()); _cullVisitorLeft->setClampProjectionMatrixCallback(_cullVisitor->getClampProjectionMatrixCallback());
_cullVisitorLeft->setTraversalMask(_cullMaskLeft); _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. // set up the right eye.
_cullVisitorRight->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler()); _cullVisitorRight->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler());
_cullVisitorRight->setClampProjectionMatrixCallback(_cullVisitor->getClampProjectionMatrixCallback()); _cullVisitorRight->setClampProjectionMatrixCallback(_cullVisitor->getClampProjectionMatrixCallback());
_cullVisitorRight->setTraversalMask(_cullMaskRight); _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) if (computeNearFar)
{ {
@ -684,7 +684,7 @@ void SceneView::cull()
{ {
_cullVisitor->setTraversalMask(_cullMask); _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) if (computeNearFar)
{ {