Public Member Functions | |
| BoundingSphere () | |
| BoundingSphere (const Vec3 ¢er, float radius) | |
| BoundingSphere (const BoundingSphere &bs) | |
| BoundingSphere (const BoundingBox &bb) | |
| void | init () | 
| bool | valid () const | 
| void | set (const Vec3 ¢er, float radius) | 
| Vec3 & | center () | 
| const Vec3 & | center () const | 
| float & | radius () | 
| float | radius () const | 
| float | radius2 () const | 
| void | expandBy (const Vec3 &v) | 
| void | expandRadiusBy (const Vec3 &v) | 
| void | expandBy (const BoundingSphere &sh) | 
| void | expandRadiusBy (const BoundingSphere &sh) | 
| void | expandBy (const BoundingBox &bb) | 
| void | expandRadiusBy (const BoundingBox &bb) | 
| bool | contains (const Vec3 &v) const | 
| bool | intersects (const BoundingSphere &bs) const | 
Public Attributes | |
| Vec3 | _center | 
| float | _radius | 
| osg::BoundingSphere::BoundingSphere | ( | ) |  [inline] | 
        
Construct a default bounding sphere with radius to -1.0f, representing an invalid/unset bounding sphere.
| osg::BoundingSphere::BoundingSphere | ( | const Vec3 & | center, | |
| float | radius | |||
| ) |  [inline] | 
        
Creates a bounding sphere initialized to the given extents.
| osg::BoundingSphere::BoundingSphere | ( | const BoundingSphere & | bs | ) |  [inline] | 
        
Creates a bounding sphere initialized to the given extents.
| osg::BoundingSphere::BoundingSphere | ( | const BoundingBox & | bb | ) |  [inline] | 
        
Creates a bounding sphere initialized to the given extents.
| const Vec3& osg::BoundingSphere::center | ( | ) |  const [inline] | 
        
Returns the const center of the bounding sphere.
| Vec3& osg::BoundingSphere::center | ( | ) |  [inline] | 
        
Returns the center of the bounding sphere.
| bool osg::BoundingSphere::contains | ( | const Vec3 & | v | ) |  const [inline] | 
        
Returns true if v is within the sphere.
| void osg::BoundingSphere::expandBy | ( | const BoundingBox & | bb | ) | 
Expands the sphere to encompass the given box. Repositions the sphere center to minimize the radius increase.
| void osg::BoundingSphere::expandBy | ( | const BoundingSphere & | sh | ) | 
Expands the sphere to encompass the given sphere. Repositions the sphere center to minimize the radius increase. If the sphere is uninitialized, set its center and radius to match sh.
| void osg::BoundingSphere::expandBy | ( | const Vec3 & | v | ) | 
Expands the sphere to encompass the given point. Repositions the sphere center to minimize the radius increase. If the sphere is uninitialized, set its center to v and radius to zero.
| void osg::BoundingSphere::expandRadiusBy | ( | const BoundingBox & | bb | ) | 
Expands the sphere to encompass the given box. Does not repositions the sphere center.
| void osg::BoundingSphere::expandRadiusBy | ( | const BoundingSphere & | sh | ) | 
Expands the sphere to encompass the given sphere. Does not repositions the sphere center. If the sphere is uninitialized, set its center and radius to match sh.
| void osg::BoundingSphere::expandRadiusBy | ( | const Vec3 & | v | ) | 
Expands the sphere to encompass the given point. Does not reposition the sphere center. If the sphere is uninitialized, set its center to v and radius to zero.
| void osg::BoundingSphere::init | ( | ) |  [inline] | 
        
Clear the bounding sphere. Reset to default values.
| bool osg::BoundingSphere::intersects | ( | const BoundingSphere & | bs | ) |  const [inline] | 
        
Returns true if there is a non-empty intersection with the given bounding sphere.
| float osg::BoundingSphere::radius | ( | ) |  const [inline] | 
        
Returns the const radius of the bounding sphere.
| float& osg::BoundingSphere::radius | ( | ) |  [inline] | 
        
Returns the radius of the bounding sphere.
| float osg::BoundingSphere::radius2 | ( | ) |  const [inline] | 
        
Returns the squared length of the radius. Note, For performance reasons, the calling method is responsible for checking to make sure the sphere is valid.
| void osg::BoundingSphere::set | ( | const Vec3 & | center, | |
| float | radius | |||
| ) |  [inline] | 
        
Set the bounding sphere to the given center/radius.
| bool osg::BoundingSphere::valid | ( | ) |  const [inline] | 
        
Returns true of the bounding sphere extents are valid, false otherwise.
 1.4.7