#include <bounds.h>
Collaboration diagram for salt::AABB3:
Public Member Functions | |
f_inline | AABB3 () |
constructs an empty bounding box | |
f_inline | AABB3 (const Vector3f &mn, const Vector3f &mx) |
constructs a bounding box encapsulating mn and mx | |
f_inline void | Init () |
sets minVec and maxVec to describe an empty bounding box | |
f_inline void | Encapsulate (const Vector3f &v) |
encapsulates the Vector v, growing the box if necessary | |
f_inline void | Encapsulate (const float x, const float y, const float z) |
encapsulates the Vector <x,y,z>, growing the box if necessary | |
f_inline void | Encapsulate (const AABB3 &box) |
encapsulates another box, growing the box if necessary | |
f_inline void | Widen (float delta) |
grows the box evenly with delta along all axis | |
f_inline void | Translate (const Vector3f &v) |
moves the box along the vector v | |
f_inline bool | Contains (const Vector3f &v) const |
returns true if he box contains the vector v | |
f_inline bool | Contains (const AABB3 &b) const |
returns true if the box contains the box b | |
f_inline bool | Intersects (const AABB3 &b) const |
returns true if this box and the box b have some space in common | |
f_inline float | GetWidth () const |
calculates the current width of the box | |
f_inline float | GetHeight () const |
calculates the current height of the box | |
f_inline float | GetDepth () const |
calculates the current depth of the box | |
f_inline Vector3f | GetMiddle () const |
calculates the center point of the box | |
f_inline float | GetRadius () const |
calculates the distance from the center point to one of the corners, i.e the radius of the bounding sphere through the center. | |
void | TransformBy (Matrix &matrix) |
Public Attributes | |
Vector3f | minVec |
a vector describing the lower corner of the box | |
Vector3f | maxVec |
a vector describing the higher corner of the box |
Definition at line 39 of file bounds.h.
|
constructs an empty bounding box
Definition at line 45 of file bounds.h. References Init(). Here is the call graph for this function: ![]() |
|
constructs a bounding box encapsulating mn and mx
Definition at line 48 of file bounds.h. References Encapsulate(), and Init(). Here is the call graph for this function: ![]() |
|
returns true if the box contains the box b
Definition at line 102 of file bounds.h. References Contains(), maxVec, and minVec. Here is the call graph for this function: ![]() |
|
returns true if he box contains the vector v
Definition at line 96 of file bounds.h. References salt::gInRange(), maxVec, minVec, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Referenced by Contains(). Here is the call graph for this function: ![]() |
|
encapsulates another box, growing the box if necessary
Definition at line 78 of file bounds.h. References Encapsulate(), maxVec, and minVec. Here is the call graph for this function: ![]() |
|
encapsulates the Vector <x,y,z>, growing the box if necessary
Definition at line 69 of file bounds.h. References salt::gMax(), salt::gMin(), maxVec, minVec, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
encapsulates the Vector v, growing the box if necessary
Definition at line 60 of file bounds.h. References salt::gMax(), salt::gMin(), maxVec, minVec, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Referenced by AABB3(), kerosin::StaticMesh::CalcBoundingBox(), Encapsulate(), TransformBy(), and oxygen::BaseNode::UpdateHierarchy(). Here is the call graph for this function: ![]() |
|
calculates the current depth of the box
Definition at line 120 of file bounds.h. References salt::gAbs(), maxVec, minVec, and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
calculates the current height of the box
Definition at line 116 of file bounds.h. References salt::gAbs(), maxVec, minVec, and salt::TVector3< DATATYPE, TYPE >::y(). Here is the call graph for this function: ![]() |
|
calculates the center point of the box
Definition at line 124 of file bounds.h. References maxVec, minVec, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
calculates the distance from the center point to one of the corners, i.e the radius of the bounding sphere through the center.
|
|
calculates the current width of the box
Definition at line 112 of file bounds.h. References salt::gAbs(), maxVec, minVec, and salt::TVector3< DATATYPE, TYPE >::x(). Here is the call graph for this function: ![]() |
|
sets minVec and maxVec to describe an empty bounding box
Definition at line 54 of file bounds.h. References maxVec, minVec, and salt::TVector3< DATATYPE, TYPE >::Set(). Referenced by AABB3(), and kerosin::StaticMesh::CalcBoundingBox(). Here is the call graph for this function: ![]() |
|
returns true if this box and the box b have some space in common
Definition at line 106 of file bounds.h. References maxVec, minVec, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
Definition at line 27 of file bounds.cpp. References Encapsulate(), maxVec, minVec, salt::TVector3< DATATYPE, TYPE >::Set(), salt::Matrix::Transform(), salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Referenced by oxygen::BaseNode::UpdateHierarchy(). Here is the call graph for this function: ![]() |
|
moves the box along the vector v
|
|
grows the box evenly with delta along all axis
Definition at line 82 of file bounds.h. References maxVec, minVec, salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
a vector describing the higher corner of the box
Definition at line 145 of file bounds.h. Referenced by salt::Plane::ClassifyBox(), kerosin::Light::ComputeBoundingBox(), oxygen::BaseNode::ComputeBoundingBox(), Contains(), salt::BoundingSphere::Contains(), Encapsulate(), GetDepth(), GetHeight(), GetMiddle(), GetRadius(), GetWidth(), Init(), Intersects(), salt::BoundingSphere::Intersects(), TransformBy(), Translate(), and Widen(). |
|
a vector describing the lower corner of the box
Definition at line 142 of file bounds.h. Referenced by salt::Plane::ClassifyBox(), kerosin::Light::ComputeBoundingBox(), oxygen::BaseNode::ComputeBoundingBox(), Contains(), salt::BoundingSphere::Contains(), Encapsulate(), GetDepth(), GetHeight(), GetMiddle(), GetRadius(), GetWidth(), Init(), Intersects(), salt::BoundingSphere::Intersects(), TransformBy(), Translate(), and Widen(). |