OSG
3.4.0
|
#include <BoundingBox.h>
Public Types | |
typedef VT | vec_type |
typedef VT::value_type | value_type |
Public Attributes | |
vec_type | _center |
value_type | _radius |
General purpose bounding sphere class for enclosing nodes/objects/vertices. Bounds internal osg::Nodes in the scene, assists in view frustum culling, etc. Similar in function to BoundingBox, it's quicker for evaluating culling but generally will not cull as aggressively because it encloses a greater volume.
Definition at line 26 of file BoundingBox.h.
typedef VT::value_type osg::BoundingSphereImpl< VT >::value_type |
Definition at line 38 of file BoundingSphere.h.
typedef VT osg::BoundingSphereImpl< VT >::vec_type |
Definition at line 37 of file BoundingSphere.h.
|
inline |
Construct a default bounding sphere with radius to -1.0f, representing an invalid/unset bounding sphere.
Definition at line 44 of file BoundingSphere.h.
|
inline |
Creates a bounding sphere initialized to the given extents.
Definition at line 47 of file BoundingSphere.h.
|
inline |
Creates a bounding sphere initialized to the given extents.
Definition at line 50 of file BoundingSphere.h.
|
inline |
Creates a bounding sphere initialized to the given extents.
Definition at line 53 of file BoundingSphere.h.
|
inline |
Returns the center of the bounding sphere.
Definition at line 77 of file BoundingSphere.h.
|
inline |
Returns the const center of the bounding sphere.
Definition at line 80 of file BoundingSphere.h.
|
inline |
Returns true if v is within the sphere.
Definition at line 125 of file BoundingSphere.h.
void osg::BoundingSphereImpl< VT >::expandBy | ( | const vector_type & | 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.
Definition at line 143 of file BoundingSphere.h.
void osg::BoundingSphereImpl< VT >::expandBy | ( | const BoundingSphereImpl< VT > & | 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.
Definition at line 181 of file BoundingSphere.h.
void osg::BoundingSphereImpl< VT >::expandBy | ( | const BoundingBoxImpl< BBT > & | bb | ) |
Expands the sphere to encompass the given box. Repositions the sphere center to minimize the radius increase.
Definition at line 252 of file BoundingSphere.h.
void osg::BoundingSphereImpl< VT >::expandRadiusBy | ( | const vector_type & | 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.
Definition at line 165 of file BoundingSphere.h.
void osg::BoundingSphereImpl< VT >::expandRadiusBy | ( | const BoundingSphereImpl< VT > & | 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.
Definition at line 232 of file BoundingSphere.h.
void osg::BoundingSphereImpl< VT >::expandRadiusBy | ( | const BoundingBoxImpl< BBT > & | bb | ) |
Expands the sphere to encompass the given box. Does not repositions the sphere center.
Definition at line 283 of file BoundingSphere.h.
|
inline |
Clear the bounding sphere. Reset to default values.
Definition at line 56 of file BoundingSphere.h.
|
inline |
Returns true if there is a non-empty intersection with the given bounding sphere.
Definition at line 133 of file BoundingSphere.h.
|
inline |
Definition at line 67 of file BoundingSphere.h.
|
inline |
Definition at line 66 of file BoundingSphere.h.
|
inline |
Returns the radius of the bounding sphere.
Definition at line 83 of file BoundingSphere.h.
|
inline |
Returns the const radius of the bounding sphere.
Definition at line 85 of file BoundingSphere.h.
|
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.
Definition at line 90 of file BoundingSphere.h.
|
inline |
Set the bounding sphere to the given center/radius using floats.
Definition at line 70 of file BoundingSphere.h.
|
inline |
Returns true of the bounding sphere extents are valid, false otherwise.
Definition at line 64 of file BoundingSphere.h.
vec_type osg::BoundingSphereImpl< VT >::_center |
Definition at line 40 of file BoundingSphere.h.
value_type osg::BoundingSphereImpl< VT >::_radius |
Definition at line 41 of file BoundingSphere.h.