OpenSceneGraph
3.5.1
|
General purpose axis-aligned bounding box class for enclosing objects/vertices. More...
Public Types | |
typedef VT | vec_type |
typedef VT::value_type | value_type |
Public Member Functions | |
BoundingBoxImpl () | |
Creates an uninitialized bounding box. More... | |
template<typename BT > | |
BoundingBoxImpl (const BoundingBoxImpl< BT > &bb) | |
BoundingBoxImpl (value_type xmin, value_type ymin, value_type zmin, value_type xmax, value_type ymax, value_type zmax) | |
Creates a bounding box initialized to the given extents. More... | |
BoundingBoxImpl (const vec_type &min, const vec_type &max) | |
Creates a bounding box initialized to the given extents. More... | |
void | init () |
Clear the bounding box. More... | |
bool | operator== (const BoundingBoxImpl &rhs) const |
bool | operator!= (const BoundingBoxImpl &rhs) const |
bool | valid () const |
Returns true if the bounding box extents are valid, false otherwise. More... | |
void | set (value_type xmin, value_type ymin, value_type zmin, value_type xmax, value_type ymax, value_type zmax) |
Sets the bounding box extents. More... | |
void | set (const vec_type &min, const vec_type &max) |
Sets the bounding box extents. More... | |
value_type & | xMin () |
value_type | xMin () const |
value_type & | yMin () |
value_type | yMin () const |
value_type & | zMin () |
value_type | zMin () const |
value_type & | xMax () |
value_type | xMax () const |
value_type & | yMax () |
value_type | yMax () const |
value_type & | zMax () |
value_type | zMax () const |
const vec_type | center () const |
Calculates and returns the bounding box center. More... | |
value_type | radius () const |
Calculates and returns the bounding box radius. More... | |
value_type | radius2 () const |
Calculates and returns the squared length of the bounding box radius. More... | |
const vec_type | corner (unsigned int pos) const |
Returns a specific corner of the bounding box. More... | |
void | expandBy (const vec_type &v) |
Expands the bounding box to include the given coordinate. More... | |
void | expandBy (value_type x, value_type y, value_type z) |
Expands the bounding box to include the given coordinate. More... | |
void | expandBy (const BoundingBoxImpl &bb) |
Expands this bounding box to include the given bounding box. More... | |
template<typename BST > | |
void | expandBy (const BoundingSphereImpl< BST > &sh) |
Expands this bounding box to include the given sphere. More... | |
BoundingBoxImpl | intersect (const BoundingBoxImpl &bb) const |
Returns the intersection of this bounding box and the specified bounding box. More... | |
bool | intersects (const BoundingBoxImpl &bb) const |
Return true if this bounding box intersects the specified bounding box. More... | |
bool | contains (const vec_type &v) const |
Returns true if this bounding box contains the specified coordinate. More... | |
bool | contains (const vec_type &v, value_type epsilon) const |
Returns true if this bounding box contains the specified coordinate allowing for specific epsilon. More... | |
Public Attributes | |
vec_type | _min |
Minimum extent. More... | |
vec_type | _max |
Maximum extent. More... | |
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 |
typedef VT osg::BoundingBoxImpl< VT >::vec_type |
|
inline |
Creates an uninitialized bounding box.
|
inline |
|
inline |
Creates a bounding box initialized to the given extents.
|
inline |
Creates a bounding box initialized to the given extents.
|
inline |
Calculates and returns the bounding box center.
|
inline |
Returns true if this bounding box contains the specified coordinate.
|
inline |
Returns true if this bounding box contains the specified coordinate allowing for specific epsilon.
|
inline |
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.
|
inline |
Expands the bounding box to include the given coordinate.
If the box is uninitialized, set its min and max extents to v.
|
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).
|
inline |
Expands this bounding box to include the given bounding box.
If this box is uninitialized, set it equal to bb.
|
inline |
Expands this bounding box to include the given sphere.
If this box is uninitialized, set it to include sh.
|
inline |
Clear the bounding box.
Erases existing minimum and maximum extents.
|
inline |
Returns the intersection of this bounding box and the specified bounding box.
|
inline |
Return true if this bounding box intersects the specified bounding box.
|
inline |
|
inline |
|
inline |
Calculates and returns the bounding box radius.
|
inline |
|
inline |
Sets the bounding box extents.
|
inline |
Sets the bounding box extents.
|
inline |
Returns true if the bounding box extents are valid, false otherwise.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
vec_type osg::BoundingBoxImpl< VT >::_max |
Maximum extent.
(Greatest X, Y, and Z values of all coordinates.)
vec_type osg::BoundingBoxImpl< VT >::_min |
Minimum extent.
(Smallest X, Y, and Z values of all coordinates.)
![]() | Generated at Wed Nov 11 2015 22:14:28 for the OpenSceneGraph by doxygen 1.8.10. |