From Chris Hanson:

Spelling fixes in include/osg/LOD

   Negated priority in PagedLOD when using _rangeMode==PIXEL_SIZE_ON_SCREEN

   Added clampedPixelSize() methods to CullStack and CullingSet to return fabs()ed values.

   Changed LOD and PagedLOD ::traverse to use clampedPixelSize() methods.
This commit is contained in:
Robert Osfield
2005-09-28 13:33:58 +00:00
parent 3c88b0cae9
commit 05528abf25
5 changed files with 34 additions and 8 deletions

View File

@@ -65,6 +65,18 @@ class OSG_EXPORT CullStack : public osg::CullSettings
return pixelSize(bs.center(),bs.radius());
}
/** Compute the pixel size of an object at position v, with specified radius. fabs()ed to always be positive. */
float clampedPixelSize(const Vec3& v,float radius) const
{
return getCurrentCullingSet().clampedPixelSize(v,radius);
}
/** Compute the pixel size of the bounding sphere. fabs()ed to always be positive. */
float clampedPixelSize(const BoundingSphere& bs) const
{
return clampedPixelSize(bs.center(),bs.radius());
}
inline void disableAndPushOccludersCurrentMask(NodePath& nodePath)
{
getCurrentCullingSet().disableAndPushOccludersCurrentMask(nodePath);