#include <bounds.h>
Collaboration diagram for salt::AABB2:
Public Member Functions | |
f_inline | AABB2 () |
constructs an empty bounding box | |
f_inline | AABB2 (const Vector2f &mn, const Vector2f &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 Vector2f &v) |
encapsulates the Vector v, growing the box if necessary | |
f_inline void | Encapsulate (const AABB2 &box) |
encapsulates another box, growing the box if necessary | |
f_inline void | Widen (float delta) |
grows the box evenly with delta along both axis | |
f_inline void | Translate (const Vector2f &v) |
moves the box along the vector v | |
f_inline bool | Contains (const Vector2f &v) const |
returns true if he box contains the vector v | |
f_inline bool | Contains (const AABB2 &b) const |
returns true if the box contains the box b | |
f_inline bool | Intersects (const AABB2 &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 Vector2f | 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. | |
Public Attributes | |
Vector2f | minVec |
a vector describing the lower corner of the box | |
Vector2f | maxVec |
a vector describing the higher corner of the box |
Definition at line 149 of file bounds.h.
|
constructs an empty bounding box
Definition at line 155 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 159 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 192 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 188 of file bounds.h. References salt::gInRange(), maxVec, minVec, salt::TVector2< DATATYPE, TYPE >::x(), and salt::TVector2< DATATYPE, TYPE >::y(). Referenced by SoccerRuleAspect::ClearPlayers(), Contains(), SoccerRuleAspect::DropBall(), CatchEffector::Realize(), and SoccerRuleAspect::UpdateGoalKick(). Here is the call graph for this function: ![]() |
|
encapsulates another box, growing the box if necessary
Definition at line 176 of file bounds.h. References Encapsulate(), maxVec, and minVec. Here is the call graph for this function: ![]() |
|
encapsulates the Vector v, growing the box if necessary
Definition at line 169 of file bounds.h. References salt::gMax(), salt::gMin(), maxVec, minVec, salt::TVector2< DATATYPE, TYPE >::x(), and salt::TVector2< DATATYPE, TYPE >::y(). Referenced by AABB2(), and Encapsulate(). Here is the call graph for this function: ![]() |
|
calculates the current height of the box
Definition at line 209 of file bounds.h. References salt::gAbs(), maxVec, minVec, and salt::TVector2< DATATYPE, TYPE >::y(). Here is the call graph for this function: ![]() |
|
calculates the center point of the box
Definition at line 214 of file bounds.h. References maxVec, minVec, salt::TVector2< DATATYPE, TYPE >::x(), and salt::TVector2< DATATYPE, TYPE >::y(). 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 204 of file bounds.h. References salt::gAbs(), maxVec, minVec, and salt::TVector2< DATATYPE, TYPE >::x(). Here is the call graph for this function: ![]() |
|
sets minVec and maxVec to describe an empty bounding box
Definition at line 165 of file bounds.h. References maxVec, minVec, and salt::TVector2< DATATYPE, TYPE >::Set(). Referenced by AABB2(). 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 196 of file bounds.h. References maxVec, minVec, salt::TVector2< DATATYPE, TYPE >::x(), and salt::TVector2< DATATYPE, TYPE >::y(). Here is the call graph for this function: ![]() |
|
moves the box along the vector v
|
|
grows the box evenly with delta along both axis
Definition at line 180 of file bounds.h. References maxVec, minVec, salt::TVector2< DATATYPE, TYPE >::x(), and salt::TVector2< DATATYPE, TYPE >::y(). Here is the call graph for this function: ![]() |
|
a vector describing the higher corner of the box
Definition at line 229 of file bounds.h. Referenced by SoccerRuleAspect::ClearPlayers(), Contains(), SoccerRuleAspect::DropBall(), Encapsulate(), GetHeight(), GetMiddle(), GetRadius(), GetWidth(), Init(), Intersects(), Translate(), and Widen(). |
|
a vector describing the lower corner of the box
Definition at line 226 of file bounds.h. Referenced by SoccerRuleAspect::ClearPlayers(), Contains(), SoccerRuleAspect::DropBall(), Encapsulate(), GetHeight(), GetMiddle(), GetRadius(), GetWidth(), Init(), Intersects(), Translate(), and Widen(). |