Added LEFT_EYE and RIGHT_EYE stereo to osg::DisplaySettings/osgUtil::SceneView
Renamed LODBias to LODScale.
This commit is contained in:
@@ -26,8 +26,8 @@ class SG_EXPORT CollectOccludersVisitor : public osg::NodeVisitor, public osg::C
|
||||
|
||||
virtual void reset();
|
||||
|
||||
virtual float getDistanceToEyePoint(const Vec3& pos, bool withLODBias) const;
|
||||
virtual float getDistanceFromEyePoint(const Vec3& pos, bool withLODBias) const;
|
||||
virtual float getDistanceToEyePoint(const Vec3& pos, bool withLODScale) const;
|
||||
virtual float getDistanceFromEyePoint(const Vec3& pos, bool withLODScale) const;
|
||||
|
||||
virtual void apply(osg::Node&);
|
||||
virtual void apply(osg::Transform& node);
|
||||
|
||||
@@ -66,8 +66,8 @@ class SG_EXPORT CullStack
|
||||
/** Returns the current CullingMode.*/
|
||||
CullingMode getCullingMode() const { return _cullingMode; }
|
||||
|
||||
void setLODBias(float bias) { _LODBias = bias; }
|
||||
float getLODBias() const { return _LODBias; }
|
||||
void setLODScale(float bias) { _LODScale = bias; }
|
||||
float getLODScale() const { return _LODScale; }
|
||||
|
||||
void setSmallFeatureCullingPixelSize(float value) { _smallFeatureCullingPixelSize=value; }
|
||||
float getSmallFeatureCullingPixelSize() const { return _smallFeatureCullingPixelSize; }
|
||||
@@ -163,7 +163,7 @@ class SG_EXPORT CullStack
|
||||
void popCullingSet();
|
||||
|
||||
CullingMode _cullingMode;
|
||||
float _LODBias;
|
||||
float _LODScale;
|
||||
float _smallFeatureCullingPixelSize;
|
||||
|
||||
// base set of shadow volume occluder to use in culling.
|
||||
|
||||
@@ -64,7 +64,9 @@ class SG_EXPORT DisplaySettings : public osg::Referenced
|
||||
QUAD_BUFFER,
|
||||
ANAGLYPHIC,
|
||||
HORIZONTAL_SPLIT,
|
||||
VERTICAL_SPLIT
|
||||
VERTICAL_SPLIT,
|
||||
LEFT_EYE,
|
||||
RIGHT_EYE
|
||||
};
|
||||
|
||||
void setStereoMode(StereoMode mode) { _stereoMode = mode; }
|
||||
|
||||
@@ -192,12 +192,12 @@ class SG_EXPORT NodeVisitor : public Referenced
|
||||
/** Get the distance from a point to the eye point, distance value in local coordinate system.
|
||||
* Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement.
|
||||
* If the getDistianceFromEyePoint(pos) is not implmented than a default value of 0.0 is returned.*/
|
||||
virtual float getDistanceToEyePoint(const Vec3& /*pos*/, bool /*useLODBias*/) const { return 0.0f; }
|
||||
virtual float getDistanceToEyePoint(const Vec3& /*pos*/, bool /*useLODScale*/) const { return 0.0f; }
|
||||
|
||||
/** Get the distance of a point from the eye point, distance value in the eye coordinate system.
|
||||
* Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement.
|
||||
* If the getDistianceFromEyePoint(pos) is not implmented than a default value of 0.0 is returned.*/
|
||||
virtual float getDistanceFromEyePoint(const Vec3& /*pos*/, bool /*useLODBias*/) const { return 0.0f; }
|
||||
virtual float getDistanceFromEyePoint(const Vec3& /*pos*/, bool /*useLODScale*/) const { return 0.0f; }
|
||||
|
||||
virtual void apply(Node& node) { traverse(node);}
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
|
||||
|
||||
virtual void reset();
|
||||
|
||||
virtual float getDistanceToEyePoint(const osg::Vec3& pos, bool withLODBias) const;
|
||||
virtual float getDistanceFromEyePoint(const osg::Vec3& pos, bool withLODBias) const;
|
||||
virtual float getDistanceToEyePoint(const osg::Vec3& pos, bool withLODScale) const;
|
||||
virtual float getDistanceFromEyePoint(const osg::Vec3& pos, bool withLODScale) const;
|
||||
|
||||
virtual void apply(osg::Node&);
|
||||
virtual void apply(osg::Geode& node);
|
||||
|
||||
@@ -167,10 +167,10 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
|
||||
const osg::Node::NodeMask getCullMaskRight() const { return _cullMaskRight; }
|
||||
|
||||
/** Set the LOD bias for the CullVisitor to use.*/
|
||||
void setLODBias(float bias) { _LODBias = bias; }
|
||||
void setLODScale(float bias) { _LODScale = bias; }
|
||||
|
||||
/** Get the LOD bias.*/
|
||||
float getLODBias() const { return _LODBias; }
|
||||
float getLODScale() const { return _LODScale; }
|
||||
|
||||
/** Set the Small Feature Culling Pixel Size.*/
|
||||
void setSmallFeatureCullingPixelSize(float value) { _smallFeatureCullingPixelSize=value; }
|
||||
@@ -319,7 +319,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced
|
||||
|
||||
CullVisitor::ComputeNearFarMode _computeNearFar;
|
||||
osg::CullStack::CullingMode _cullingMode;
|
||||
float _LODBias;
|
||||
float _LODScale;
|
||||
float _smallFeatureCullingPixelSize;
|
||||
|
||||
FusionDistanceMode _fusionDistanceMode;
|
||||
|
||||
Reference in New Issue
Block a user