openscenegraph
|
#include <BoundingBox>
Public Types | |
typedef VT | vec_type |
typedef VT::value_type | value_type |
Public Attributes | |
vec_type | _min |
vec_type | _max |
General purpose axis-aligned bounding box class for enclosing objects/vertices. Bounds leaf objects in a scene such as osg::Drawable objects. Used for frustum culling etc.
typedef VT::value_type osg::BoundingBoxImpl< VT >::value_type |
|
inline |
Creates an uninitialized bounding box.
Referenced by osg::BoundingBoxImpl< VT >::intersect().
|
inline |
|
inline |
Creates a bounding box initialized to the given extents.
Creates a bounding box initialized to the given extents.
Calculates and returns the bounding box center.
References osg::BoundingBoxImpl< VT >::_max, and osg::BoundingBoxImpl< VT >::_min.
Referenced by osg::BoundingSphereImpl< VT >::expandBy(), and osg::BoundingSphereImpl< VT >::expandRadiusBy().
Returns true if this bounding box contains the specified coordinate.
References osg::BoundingBoxImpl< VT >::_max, osg::BoundingBoxImpl< VT >::_min, and osg::BoundingBoxImpl< VT >::valid().
|
inline |
Returns true if this bounding box contains the specified coordinate allowing for specific epsilon.
References osg::BoundingBoxImpl< VT >::_max, osg::BoundingBoxImpl< VT >::_min, osg::BoundingBoxImpl< VT >::set(), and osg::BoundingBoxImpl< VT >::valid().
Returns a specific corner of the bounding box. pos specifies the corner as a number between 0 and 7. Each bit selects an axis, X, Y, or Z from least- to most-significant. Unset bits select the minimum value for that axis, and set bits select the maximum.
References osg::BoundingBoxImpl< VT >::_max, osg::BoundingBoxImpl< VT >::_min, and osg::BoundingBoxImpl< VT >::set().
Referenced by osg::BoundingSphereImpl< VT >::expandBy(), osg::BoundingSphereImpl< VT >::expandRadiusBy(), and osg::Plane::intersect().
|
inline |
Expands this bounding box to include the given bounding box. If this box is uninitialized, set it equal to bb.
References osg::BoundingBoxImpl< VT >::_max, osg::BoundingBoxImpl< VT >::_min, and osg::BoundingBoxImpl< VT >::valid().
|
inline |
Expands this bounding box to include the given sphere. If this box is uninitialized, set it to include sh.
References osg::BoundingBoxImpl< VT >::_max, osg::BoundingBoxImpl< VT >::_min, and osg::BoundingBoxImpl< VT >::set().
Expands the bounding box to include the given coordinate. If the box is uninitialized, set its min and max extents to v.
References osg::BoundingBoxImpl< VT >::_max, and osg::BoundingBoxImpl< VT >::_min.
Referenced by osg::BoundingSphereImpl< VT >::expandBy(), and osg::Drawable::getBoundingBox().
|
inline |
Expands the bounding box to include the given coordinate. If the box is uninitialized, set its min and max extents to Vec3(x,y,z).
References osg::BoundingBoxImpl< VT >::_max, and osg::BoundingBoxImpl< VT >::_min.
|
inline |
Clear the bounding box. Erases existing minimum and maximum extents.
References osg::BoundingBoxImpl< VT >::_max, osg::BoundingBoxImpl< VT >::_min, and osg::BoundingBoxImpl< VT >::set().
|
inline |
Returns the intersection of this bounding box and the specified bounding box.
References osg::BoundingBoxImpl< VT >::BoundingBoxImpl(), osg::maximum(), osg::minimum(), osg::BoundingBoxImpl< VT >::xMax(), osg::BoundingBoxImpl< VT >::xMin(), osg::BoundingBoxImpl< VT >::yMax(), osg::BoundingBoxImpl< VT >::yMin(), osg::BoundingBoxImpl< VT >::zMax(), and osg::BoundingBoxImpl< VT >::zMin().
|
inline |
Return true if this bounding box intersects the specified bounding box.
References osg::maximum(), osg::minimum(), osg::BoundingBoxImpl< VT >::xMax(), osg::BoundingBoxImpl< VT >::xMin(), osg::BoundingBoxImpl< VT >::yMax(), osg::BoundingBoxImpl< VT >::yMin(), osg::BoundingBoxImpl< VT >::zMax(), and osg::BoundingBoxImpl< VT >::zMin().
|
inline |
|
inline |
|
inline |
Calculates and returns the bounding box radius.
References osg::BoundingBoxImpl< VT >::radius2(), and osg::BoundingBoxImpl< VT >::set().
Referenced by osg::BoundingSphereImpl< VT >::expandBy(), and osg::BoundingSphereImpl< VT >::expandRadiusBy().
|
inline |
Calculates and returns the squared length of the bounding box radius. Note, radius2() is faster to calculate than radius().
References osg::BoundingBoxImpl< VT >::_max, and osg::BoundingBoxImpl< VT >::_min.
Referenced by osg::BoundingBoxImpl< VT >::radius().
|
inline |
Sets the bounding box extents.
References osg::BoundingBoxImpl< VT >::_max, osg::BoundingBoxImpl< VT >::_min, and osg::BoundingBoxImpl< VT >::set().
|
inline |
Sets the bounding box extents.
References osg::BoundingBoxImpl< VT >::_max, osg::BoundingBoxImpl< VT >::_min, and osg::BoundingBoxImpl< VT >::set().
Referenced by osg::BoundingBoxImpl< VT >::contains(), osg::BoundingBoxImpl< VT >::corner(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingBoxImpl< VT >::init(), osg::BoundingBoxImpl< VT >::operator!=(), osg::BoundingBoxImpl< VT >::operator==(), osg::BoundingBoxImpl< VT >::radius(), osg::BoundingBoxImpl< VT >::set(), and osg::BoundingBoxImpl< VT >::set().
|
inline |
Returns true if the bounding box extents are valid, false otherwise.
References osg::BoundingBoxImpl< VT >::_max, and osg::BoundingBoxImpl< VT >::_min.
Referenced by osg::BoundingBoxImpl< VT >::contains(), osg::BoundingBoxImpl< VT >::contains(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingSphereImpl< VT >::expandBy(), osg::BoundingSphereImpl< VT >::expandRadiusBy(), and osg::CullStack::isCulled().
|
inline |
References osg::BoundingBoxImpl< VT >::_max.
Referenced by osg::BoundingBoxImpl< VT >::intersect(), osg::BoundingBoxImpl< VT >::intersects(), and osg::Polytope::setToBoundingBox().
|
inline |
References osg::BoundingBoxImpl< VT >::_max.
|
inline |
References osg::BoundingBoxImpl< VT >::_min.
Referenced by osg::BoundingBoxImpl< VT >::intersect(), osg::BoundingBoxImpl< VT >::intersects(), and osg::Polytope::setToBoundingBox().
|
inline |
References osg::BoundingBoxImpl< VT >::_min.
|
inline |
References osg::BoundingBoxImpl< VT >::_max.
Referenced by osg::BoundingBoxImpl< VT >::intersect(), osg::BoundingBoxImpl< VT >::intersects(), and osg::Polytope::setToBoundingBox().
|
inline |
References osg::BoundingBoxImpl< VT >::_max.
|
inline |
References osg::BoundingBoxImpl< VT >::_min.
Referenced by osg::BoundingBoxImpl< VT >::intersect(), osg::BoundingBoxImpl< VT >::intersects(), and osg::Polytope::setToBoundingBox().
|
inline |
References osg::BoundingBoxImpl< VT >::_min.
|
inline |
References osg::BoundingBoxImpl< VT >::_max.
Referenced by osg::BoundingBoxImpl< VT >::intersect(), osg::BoundingBoxImpl< VT >::intersects(), and osg::Polytope::setToBoundingBox().
|
inline |
References osg::BoundingBoxImpl< VT >::_max.
|
inline |
References osg::BoundingBoxImpl< VT >::_min.
Referenced by osg::BoundingBoxImpl< VT >::intersect(), osg::BoundingBoxImpl< VT >::intersects(), and osg::Polytope::setToBoundingBox().
|
inline |
References osg::BoundingBoxImpl< VT >::_min.
vec_type osg::BoundingBoxImpl< VT >::_max |
Maximum extent. (Greatest X, Y, and Z values of all coordinates.)
Referenced by osg::BoundingBoxImpl< VT >::center(), osg::BoundingBoxImpl< VT >::contains(), osg::BoundingBoxImpl< VT >::contains(), osg::BoundingBoxImpl< VT >::corner(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingBoxImpl< VT >::init(), osg::BoundingBoxImpl< VT >::operator!=(), osg::BoundingBoxImpl< VT >::operator==(), osg::BoundingBoxImpl< VT >::radius2(), osg::BoundingBoxImpl< VT >::set(), osg::BoundingBoxImpl< VT >::set(), osg::BoundingBoxImpl< VT >::valid(), osg::BoundingBoxImpl< VT >::xMax(), osg::BoundingBoxImpl< VT >::xMax(), osg::BoundingBoxImpl< VT >::yMax(), osg::BoundingBoxImpl< VT >::yMax(), osg::BoundingBoxImpl< VT >::zMax(), and osg::BoundingBoxImpl< VT >::zMax().
vec_type osg::BoundingBoxImpl< VT >::_min |
Minimum extent. (Smallest X, Y, and Z values of all coordinates.)
Referenced by osg::BoundingBoxImpl< VT >::center(), osg::BoundingBoxImpl< VT >::contains(), osg::BoundingBoxImpl< VT >::contains(), osg::BoundingBoxImpl< VT >::corner(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingBoxImpl< VT >::expandBy(), osg::BoundingBoxImpl< VT >::init(), osg::BoundingBoxImpl< VT >::operator!=(), osg::BoundingBoxImpl< VT >::operator==(), osg::BoundingBoxImpl< VT >::radius2(), osg::BoundingBoxImpl< VT >::set(), osg::BoundingBoxImpl< VT >::set(), osg::BoundingBoxImpl< VT >::valid(), osg::BoundingBoxImpl< VT >::xMin(), osg::BoundingBoxImpl< VT >::xMin(), osg::BoundingBoxImpl< VT >::yMin(), osg::BoundingBoxImpl< VT >::yMin(), osg::BoundingBoxImpl< VT >::zMin(), and osg::BoundingBoxImpl< VT >::zMin().