Represents a sphere defined by its center point and radius. More...
#include "physxSphere.h"
Public Member Functions | |
PhysxSphere (const PhysxSphere &sphere) | |
bool | contains (const LPoint3f &p) const |
Tests if a point is contained within the sphere. More... | |
bool | contains (const PhysxSphere &sphere) const |
Tests if a sphere is contained within the sphere. More... | |
bool | contains (const LPoint3f &min, const LPoint3f &max) const |
Tests if an axis aligned box is contained within the sphere. More... | |
LPoint3f | get_center () const |
Returns the center of the sphere. More... | |
float | get_radius () const |
Returns the sphere's radius. More... | |
bool | intersect (const PhysxSphere &sphere) const |
Tests if the sphere intersects another sphere. More... | |
bool | is_valid () const |
Returns TRUE if this sphere is valid. More... | |
void | set_center (LPoint3f value) |
Sets the center of the sphere. More... | |
void | set_radius (float value) |
Sets the sphere's radius. More... | |
Public Attributes | |
NxSphere | _sphere |
Represents a sphere defined by its center point and radius.
Definition at line 25 of file physxSphere.h.
bool PhysxSphere::contains | ( | const LPoint3f & | p | ) | const |
Tests if a point is contained within the sphere.
Definition at line 30 of file physxSphere.cxx.
bool PhysxSphere::contains | ( | const PhysxSphere & | sphere | ) | const |
Tests if a sphere is contained within the sphere.
Definition at line 41 of file physxSphere.cxx.
bool PhysxSphere::contains | ( | const LPoint3f & | min, |
const LPoint3f & | max | ||
) | const |
Tests if an axis aligned box is contained within the sphere.
The axis aligned box is defined by the minimum corner and the maximum corner.
Definition at line 51 of file physxSphere.cxx.
LPoint3f PhysxSphere::get_center | ( | ) | const |
Returns the center of the sphere.
Definition at line 74 of file physxSphere.cxx.
References PhysxManager::nxVec3_to_vec3().
float PhysxSphere::get_radius | ( | ) | const |
Returns the sphere's radius.
Definition at line 94 of file physxSphere.cxx.
bool PhysxSphere::intersect | ( | const PhysxSphere & | sphere | ) | const |
Tests if the sphere intersects another sphere.
Returns TRUE if the spheres overlap.
Definition at line 65 of file physxSphere.cxx.
bool PhysxSphere::is_valid | ( | ) | const |
Returns TRUE if this sphere is valid.
Definition at line 21 of file physxSphere.cxx.
void PhysxSphere::set_center | ( | LPoint3f | value | ) |
Sets the center of the sphere.
Definition at line 83 of file physxSphere.cxx.
void PhysxSphere::set_radius | ( | float | value | ) |
Sets the sphere's radius.
Definition at line 103 of file physxSphere.cxx.