Added _maximumNumberOfActiveOccluders variable to CollectOccludersVisitor(), to

limit the maximum number of occluders used in the cull traversal, default is
now 10.

Added set/getCollectOccluderVisitor() method into SceneView to allow control
of the the settings of the CollectOccluderVisitor.
This commit is contained in:
Robert Osfield
2003-12-11 16:46:45 +00:00
parent 8f41f8a149
commit 5295d68fd3
4 changed files with 48 additions and 15 deletions

View File

@@ -19,6 +19,7 @@
#include <osg/Light>
#include <osg/FrameStamp>
#include <osg/DisplaySettings>
#include <osg/CollectOccludersVisitor>
#include <osgUtil/CullVisitor>
@@ -234,6 +235,10 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
void setCullVisitorRight(osgUtil::CullVisitor* cv) { _cullVisitorRight = cv; }
osgUtil::CullVisitor* getCullVisitorRight() { return _cullVisitorRight.get(); }
const osgUtil::CullVisitor* getCullVisitorRight() const { return _cullVisitorRight.get(); }
void setCollectOccludersVisitor(osg::CollectOccludersVisitor* cov) { _collectOccludersVisistor = cov; }
osg::CollectOccludersVisitor* getCollectOccludersVisitor() { return _collectOccludersVisistor.get(); }
const osg::CollectOccludersVisitor* getCollectOccludersVisitor() const { return _collectOccludersVisistor.get(); }
void setRenderGraph(osgUtil::RenderGraph* rg) { _rendergraph = rg; }
@@ -465,8 +470,11 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
osg::ref_ptr<osgUtil::RenderGraph> _rendergraphRight;
osg::ref_ptr<osgUtil::RenderStage> _renderStageRight;
osg::ref_ptr<osg::CollectOccludersVisitor> _collectOccludersVisistor;
osg::ref_ptr<osg::FrameStamp> _frameStamp;
osg::Vec4 _backgroundColor;
CullVisitor::ComputeNearFarMode _computeNearFar;