#include <bounds.h>
Collaboration diagram for salt::BoundingSphere:
Public Member Functions | |
f_inline | BoundingSphere () |
constructs an empty sphere | |
f_inline | BoundingSphere (const Vector3f &pos, float rad) |
constructs a sphere around pos with the radius rad | |
f_inline | BoundingSphere (const Vector3f &pos, float rad, float radSq) |
Constructs a bounding sphere. | |
f_inline void | EncapsulateFast (const Vector3f &v) |
encapsulates the vector v in the sphere, growing it if neccesary. | |
f_inline bool | Contains (const Vector3f &v) |
returns true if the sphere contains the vector v | |
f_inline bool | Contains (const BoundingSphere &s) const |
returns true if the sphere contains the sphere s | |
f_inline bool | Intersects (const BoundingSphere &s) const |
returns true if this sphere and the sphere s intersect | |
void | Encapsulate (const Vector3f &v) |
encapsulates the vector v in the sphere, growing it if neccesary. | |
bool | Contains (const AABB3 &b) const |
returns true, if the sphere contains the axis aligned bounding box b | |
bool | Intersects (const AABB3 &b) const |
returns true, if the sphere and the axis aligned bounding box b intersect | |
Public Attributes | |
Vector3f | center |
describes the center of the sphere | |
float | radius |
describes the radius of the sphere | |
float | radiusSq |
the square of the sphere radius. |
Definition at line 234 of file bounds.h.
|
constructs an empty sphere
|
|
constructs a sphere around pos with the radius rad
|
|
Constructs a bounding sphere.
|
|
returns true, if the sphere contains the axis aligned bounding box b
Definition at line 89 of file bounds.cpp. References center, salt::AABB3::maxVec, salt::AABB3::minVec, and radiusSq. |
|
returns true if the sphere contains the sphere s
|
|
returns true if the sphere contains the vector v
Definition at line 266 of file bounds.h. References center, and radiusSq. Referenced by SoccerRuleAspect::ClearPlayers(). |
|
encapsulates the vector v in the sphere, growing it if neccesary. this method is accurate but slower than EncapsulateFast Definition at line 47 of file bounds.cpp. References center, salt::TVector< DATATYPE, ELEMENTS, TYPE >::Dot(), salt::TVector< DATATYPE, ELEMENTS, TYPE >::Length(), salt::TVector< DATATYPE, ELEMENTS, TYPE >::Normalized(), radius, and radiusSq. Here is the call graph for this function: ![]() |
|
encapsulates the vector v in the sphere, growing it if neccesary. this method is fast but not accurate Definition at line 260 of file bounds.h. References center, salt::TVector< DATATYPE, ELEMENTS, TYPE >::Dot(), salt::gSqrt(), radius, and radiusSq. Here is the call graph for this function: ![]() |
|
returns true, if the sphere and the axis aligned bounding box b intersect
Definition at line 65 of file bounds.cpp. References center, salt::AABB3::maxVec, salt::AABB3::minVec, and radiusSq. |
|
returns true if this sphere and the sphere s intersect
|
|
describes the center of the sphere
Definition at line 297 of file bounds.h. Referenced by Contains(), Encapsulate(), EncapsulateFast(), and Intersects(). |
|
describes the radius of the sphere
Definition at line 300 of file bounds.h. Referenced by Contains(), Encapsulate(), EncapsulateFast(), and Intersects(). |
|
the square of the sphere radius. The value ist either accuratly calculated in the constructor or user supplied and may be inaccurate. Definition at line 305 of file bounds.h. Referenced by Contains(), Encapsulate(), EncapsulateFast(), and Intersects(). |