Public Methods | |
| BoundingBox () | |
| construct to invalid values to represent an unset bounding box. | |
| BoundingBox (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax) | |
| construct to with specified min and max values. | |
| BoundingBox (const Vec3 &min, const Vec3 &max) | |
| construct to with specified min and max values. | |
| void | init () |
| initialize to invalid values to represent an unset bounding box. | |
| const bool | valid () const |
| void | set (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax) |
| void | set (const Vec3 &min, const Vec3 &max) |
| construct to with specified min and max values. | |
| float & | xMin () |
| const float | xMin () const |
| float & | yMin () |
| const float | yMin () const |
| float & | zMin () |
| const float | zMin () const |
| float & | xMax () |
| const float | xMax () const |
| float & | yMax () |
| const float | yMax () const |
| float & | zMax () |
| const float | zMax () const |
| const Vec3 | center () const |
| Calculate and return the center of the bounding box. | |
| const float | radius () const |
| Calculate and return the radius of the bounding box. | |
| const float | radius2 () const |
| Calculate and return the radius squared of the bounding box. | |
| const Vec3 | corner (unsigned int pos) const |
| return the corner of the bounding box. | |
| void | expandBy (const Vec3 &v) |
| If the vertex is out-with the box expand to encompass vertex. | |
| void | expandBy (float x, float y, float z) |
| If the vertex is out-with the box expand to encompass vertex. | |
| void | expandBy (const BoundingBox &bb) |
| If incoming box is out-with the box expand to encompass incoming box. | |
| void | expandBy (const BoundingSphere &sh) |
| If incoming sphere is out-with the box expand to encompass incoming sphere. | |
| const bool | contains (const Vec3 &v) const |
| return true is vertex v is within the box. | |
Public Attributes | |
| Vec3 | _min |
| The corner with the smallest values for each coordinate of the bounding box. | |
| Vec3 | _max |
| The corner with the largest values for each coordinate of the bounding box. | |
Used to bounding the leaf objects in the scene, i.e. osg::Drawable's to assist in view frustum culling etc.
|
|
construct to invalid values to represent an unset bounding box.
|
|
||||||||||||||||||||||||||||
|
construct to with specified min and max values.
|
|
||||||||||||
|
construct to with specified min and max values.
|
|
|
Calculate and return the center of the bounding box.
|
|
|
return true is vertex v is within the box.
|
|
|
return the corner of the bounding box. Position (pos) is specified by a number between 0 and 7, the first bit toggles between x min and x max, second bit toggles between y min and y max, third bit toggles between z min and z max. |
|
|
If incoming sphere is out-with the box expand to encompass incoming sphere. If this box is empty then move set this box to encompass the sphere. |
|
|
If incoming box is out-with the box expand to encompass incoming box. If this box is empty then move set this box to incoming box. |
|
||||||||||||||||
|
If the vertex is out-with the box expand to encompass vertex. If this box is empty then move set this box's min max to vertex. |
|
|
If the vertex is out-with the box expand to encompass vertex. If this box is empty then move set this box's min max to vertex. |
|
|
initialize to invalid values to represent an unset bounding box.
|
|
|
Calculate and return the radius of the bounding box.
|
|
|
Calculate and return the radius squared of the bounding box. |
|
||||||||||||
|
construct to with specified min and max values.
|
|
||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The corner with the largest values for each coordinate of the bounding box.
|
|
|
The corner with the smallest values for each coordinate of the bounding box.
|