From 408c2a226745480b7e51d45ebc8f06e5f746b37e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 13 Sep 2011 09:59:21 +0000 Subject: [PATCH] From Paul Martz, "Here's my proposed change regarding the osg-users post "small feature culling threshold". I've updated the comments and brought the default values into agreement, but didn't bother to add the environment variable support." --- include/osg/CullSettings | 3 ++- include/osg/CullingSet | 2 ++ src/osg/CullingSet.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/osg/CullSettings b/include/osg/CullSettings index dece95893..38f2dc5c5 100644 --- a/include/osg/CullSettings +++ b/include/osg/CullSettings @@ -217,7 +217,8 @@ class OSG_EXPORT CullSettings /** Get the LOD bias.*/ float getLODScale() const { return _LODScale; } - /** Set the Small Feature Culling Pixel Size.*/ + /** Threshold at which small features are culled. + \param value Boulding volume size in screen space. Default is 2.0. */ void setSmallFeatureCullingPixelSize(float value) { _smallFeatureCullingPixelSize=value; applyMaskAction(SMALL_FEATURE_CULLING_PIXEL_SIZE); } /** Get the Small Feature Culling Pixel Size.*/ diff --git a/include/osg/CullingSet b/include/osg/CullingSet index cb1739827..549237e3e 100644 --- a/include/osg/CullingSet +++ b/include/osg/CullingSet @@ -161,6 +161,8 @@ class OSG_EXPORT CullingSet : public Referenced Vec4& getPixelSizeVector() { return _pixelSizeVector; } const Vec4& getPixelSizeVector() const { return _pixelSizeVector; } + /** Threshold at which small features are culled. + \param value Boulding volume size in screen space. Default is 2.0. */ void setSmallFeatureCullingPixelSize(float value) { _smallFeatureCullingPixelSize=value; } float& getSmallFeatureCullingPixelSize() { return _smallFeatureCullingPixelSize; } diff --git a/src/osg/CullingSet.cpp b/src/osg/CullingSet.cpp index 41e12e4b4..5ab7f79b4 100644 --- a/src/osg/CullingSet.cpp +++ b/src/osg/CullingSet.cpp @@ -18,7 +18,7 @@ CullingSet::CullingSet() { _mask = ENABLE_ALL_CULLING; _pixelSizeVector.set(0,0,0,1); - _smallFeatureCullingPixelSize=1.0f; + _smallFeatureCullingPixelSize=2.0f; } CullingSet::~CullingSet()