A little more work on Occlusion culling.

This commit is contained in:
Robert Osfield
2002-06-11 19:52:55 +00:00
parent 247cb3ff7e
commit fa13d948b5
6 changed files with 83 additions and 9 deletions

View File

@@ -54,6 +54,9 @@ class SG_EXPORT CullStack
void pushModelViewMatrix(osg::Matrix* matrix);
void popModelViewMatrix();
void setLODBias(const float bias) { _LODBias = bias; }
const float getLODBias() const { return _LODBias; }
void setSmallFeatureCullingPixelSize(float value) { _smallFeatureCullingPixelSize=value; }
float& getSmallFeatureCullingPixelSize() { return _smallFeatureCullingPixelSize; }
float getSmallFeatureCullingPixelSize() const { return _smallFeatureCullingPixelSize; }
@@ -128,6 +131,7 @@ class SG_EXPORT CullStack
void popCullingSet();
CullingMode _cullingMode;
float _LODBias;
float _smallFeatureCullingPixelSize;
typedef fast_back_stack< ref_ptr<Matrix> > MatrixStack;

View File

@@ -67,9 +67,6 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
const osg::EarthSky* getEarthSky() const { return _earthSky.get(); }
void setLODBias(const float bias) { _LODBias = bias; }
const float getLODBias() const { return _LODBias; }
/** Switch the creation of Impostors on or off.
* Setting active to false forces the CullVisitor to use the Impostor
* LOD children for rendering. Setting active to true forces the
@@ -233,8 +230,6 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
RenderBin* _currentRenderBin;
float _LODBias;
ComputeNearFarMode _computeNearFar;
float _computed_znear;
float _computed_zfar;