My Project
Public Member Functions | Public Attributes | List of all members
ParaEngine::CShapeSphere Class Reference

Public Member Functions

 CShapeSphere ()
 Constructor.
 
 CShapeSphere (const Vector3 &center, float radius)
 Constructor.
 
 CShapeSphere (int nb_verts, const Vector3 *verts)
 Constructor.
 
 CShapeSphere (const CShapeSphere &sphere)
 Copy constructor.
 
 ~CShapeSphere ()
 Destructor.
 
void Compute (int nb_verts, const Vector3 *verts)
 
const Vector3GetCenter () const
 
float GetRadius () const
 
const Vector3Center () const
 
float Radius () const
 
CShapeSphereSet (const Vector3 &center, float radius)
 
CShapeSphereSetCenter (const Vector3 &center)
 
CShapeSphereSetRadius (float radius)
 
bool Contains (const Vector3 &p) const
 Tests if a point is contained within the sphere. More...
 
bool Contains (const CShapeSphere &sphere) const
 Tests if a sphere is contained within the sphere. More...
 
BOOL Contains (const CShapeAABB &aabb) const
 Tests if a box is contained within the sphere. More...
 
bool Intersect (const CShapeSphere &sphere) const
 Tests if the sphere intersects another sphere. More...
 
BOOL IsValid () const
 Checks the sphere is valid. More...
 

Public Attributes

Vector3 mCenter
 Sphere center.
 
float mRadius
 Sphere radius.
 

Member Function Documentation

§ Contains() [1/3]

bool ParaEngine::CShapeSphere::Contains ( const Vector3 p) const
inline

Tests if a point is contained within the sphere.

Parameters
p[in] the point to test
Returns
true if inside the sphere

§ Contains() [2/3]

bool ParaEngine::CShapeSphere::Contains ( const CShapeSphere sphere) const
inline

Tests if a sphere is contained within the sphere.

Parameters
sphere[in] the sphere to test
Returns
true if inside the sphere

§ Contains() [3/3]

BOOL CShapeSphere::Contains ( const CShapeAABB aabb) const
inline

Tests if a box is contained within the sphere.

Parameters
aabb[in] the box to test
Returns
true if inside the sphere

§ Intersect()

bool ParaEngine::CShapeSphere::Intersect ( const CShapeSphere sphere) const
inline

Tests if the sphere intersects another sphere.

Parameters
sphere[in] the other sphere
Returns
true if spheres overlap

§ IsValid()

BOOL ParaEngine::CShapeSphere::IsValid ( ) const
inline

Checks the sphere is valid.

Returns
true if the box is valid

The documentation for this class was generated from the following files: