TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Protected Attributes | List of all members
cSphere< T > Class Template Reference

Detailed Description

template<typename T>
class ni::cSphere< T >

Sphere template class.

Public Member Functions

 cSphere (const sVec3< T > &aPos, T aRadius)
 
 cSphere (const sVec3< T > &aPos)
 
 cSphere (T aRadius=1.0f)
 
void Transform (const sMatrixf &avMatrix)
 Transform by the specified matrix. More...
 

Protected Attributes

sVec3< T > mvPosition
 
mRadius
 

Properties

void SetRadius (T aRadius)
 Set the sphere radius. More...
 
GetRadius () const
 Get the sphere radius. More...
 
void SetPosition (const sVec3< T > &aPos)
 Set the sphere position. More...
 
const sVec3< T > & GetPosition () const
 Get the sphere position. More...
 
void SetCenter (const sVec3< T > &aPos)
 Set the sphere center (same as position). More...
 
const sVec3< T > & GetCenter () const
 Get the sphere center (same as position). More...
 

Intersection tests

tBool Intersect (const sVec3< T > &vPos) const
 Intersection with a point. More...
 
Intersect (const sVec3< T > &avPos, const sVec3< T > &avDir) const
 Intersection with a ray. More...
 

Member Data Documentation

sVec3<T> mvPosition
protected
T mRadius
protected