doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
idSphere Class Reference

#include <Sphere.h>

Public Member Functions

 idSphere (void)
 
 idSphere (const idVec3 &point)
 
 idSphere (const idVec3 &point, const float r)
 
float operator[] (const int index) const
 
floatoperator[] (const int index)
 
idSphere operator+ (const idVec3 &t) const
 
idSphereoperator+= (const idVec3 &t)
 
idSphere operator+ (const idSphere &s) const
 
idSphereoperator+= (const idSphere &s)
 
bool Compare (const idSphere &a) const
 
bool Compare (const idSphere &a, const float epsilon) const
 
bool operator== (const idSphere &a) const
 
bool operator!= (const idSphere &a) const
 
void Clear (void)
 
void Zero (void)
 
void SetOrigin (const idVec3 &o)
 
void SetRadius (const float r)
 
const idVec3GetOrigin (void) const
 
float GetRadius (void) const
 
bool IsCleared (void) const
 
bool AddPoint (const idVec3 &p)
 
bool AddSphere (const idSphere &s)
 
idSphere Expand (const float d) const
 
idSphereExpandSelf (const float d)
 
idSphere Translate (const idVec3 &translation) const
 
idSphereTranslateSelf (const idVec3 &translation)
 
float PlaneDistance (const idPlane &plane) const
 
int PlaneSide (const idPlane &plane, const float epsilon=ON_EPSILON) const
 
bool ContainsPoint (const idVec3 &p) const
 
bool IntersectsSphere (const idSphere &s) const
 
bool LineIntersection (const idVec3 &start, const idVec3 &end) const
 
bool RayIntersection (const idVec3 &start, const idVec3 &dir, float &scale1, float &scale2) const
 
void FromPoints (const idVec3 *points, const int numPoints)
 
void FromPointTranslation (const idVec3 &point, const idVec3 &translation)
 
void FromSphereTranslation (const idSphere &sphere, const idVec3 &start, const idVec3 &translation)
 
void FromPointRotation (const idVec3 &point, const idRotation &rotation)
 
void FromSphereRotation (const idSphere &sphere, const idVec3 &start, const idRotation &rotation)
 
void AxisProjection (const idVec3 &dir, float &min, float &max) const
 

Private Attributes

idVec3 origin
 
float radius
 

Detailed Description

Definition at line 40 of file Sphere.h.

Constructor & Destructor Documentation

ID_INLINE idSphere::idSphere ( void  )

Definition at line 101 of file Sphere.h.

ID_INLINE idSphere::idSphere ( const idVec3 point)
explicit

Definition at line 104 of file Sphere.h.

ID_INLINE idSphere::idSphere ( const idVec3 point,
const float  r 
)
explicit

Definition at line 109 of file Sphere.h.

Member Function Documentation

ID_INLINE bool idSphere::AddPoint ( const idVec3 p)

Definition at line 177 of file Sphere.h.

ID_INLINE bool idSphere::AddSphere ( const idSphere s)

Definition at line 195 of file Sphere.h.

ID_INLINE void idSphere::AxisProjection ( const idVec3 dir,
float min,
float max 
) const

Definition at line 268 of file Sphere.h.

ID_INLINE void idSphere::Clear ( void  )

Definition at line 147 of file Sphere.h.

ID_INLINE bool idSphere::Compare ( const idSphere a) const

Definition at line 131 of file Sphere.h.

ID_INLINE bool idSphere::Compare ( const idSphere a,
const float  epsilon 
) const

Definition at line 135 of file Sphere.h.

ID_INLINE bool idSphere::ContainsPoint ( const idVec3 p) const

Definition at line 231 of file Sphere.h.

ID_INLINE idSphere idSphere::Expand ( const float  d) const

Definition at line 213 of file Sphere.h.

ID_INLINE idSphere & idSphere::ExpandSelf ( const float  d)

Definition at line 217 of file Sphere.h.

ID_INLINE void idSphere::FromPointRotation ( const idVec3 point,
const idRotation rotation 
)

Definition at line 256 of file Sphere.h.

void idSphere::FromPoints ( const idVec3 points,
const int  numPoints 
)

Definition at line 138 of file Sphere.cpp.

ID_INLINE void idSphere::FromPointTranslation ( const idVec3 point,
const idVec3 translation 
)

Definition at line 246 of file Sphere.h.

ID_INLINE void idSphere::FromSphereRotation ( const idSphere sphere,
const idVec3 start,
const idRotation rotation 
)

Definition at line 262 of file Sphere.h.

ID_INLINE void idSphere::FromSphereTranslation ( const idSphere sphere,
const idVec3 start,
const idVec3 translation 
)

Definition at line 251 of file Sphere.h.

ID_INLINE const idVec3 & idSphere::GetOrigin ( void  ) const

Definition at line 165 of file Sphere.h.

ID_INLINE float idSphere::GetRadius ( void  ) const

Definition at line 169 of file Sphere.h.

ID_INLINE bool idSphere::IntersectsSphere ( const idSphere s) const

Definition at line 238 of file Sphere.h.

ID_INLINE bool idSphere::IsCleared ( void  ) const

Definition at line 173 of file Sphere.h.

bool idSphere::LineIntersection ( const idVec3 start,
const idVec3 end 
) const

Definition at line 79 of file Sphere.cpp.

ID_INLINE bool idSphere::operator!= ( const idSphere a) const

Definition at line 143 of file Sphere.h.

ID_INLINE idSphere idSphere::operator+ ( const idVec3 t) const

Definition at line 122 of file Sphere.h.

idSphere idSphere::operator+ ( const idSphere s) const
ID_INLINE idSphere & idSphere::operator+= ( const idVec3 t)

Definition at line 126 of file Sphere.h.

idSphere& idSphere::operator+= ( const idSphere s)
ID_INLINE bool idSphere::operator== ( const idSphere a) const

Definition at line 139 of file Sphere.h.

ID_INLINE float idSphere::operator[] ( const int  index) const

Definition at line 114 of file Sphere.h.

ID_INLINE float & idSphere::operator[] ( const int  index)

Definition at line 118 of file Sphere.h.

float idSphere::PlaneDistance ( const idPlane plane) const

Definition at line 41 of file Sphere.cpp.

int idSphere::PlaneSide ( const idPlane plane,
const float  epsilon = ON_EPSILON 
) const

Definition at line 59 of file Sphere.cpp.

bool idSphere::RayIntersection ( const idVec3 start,
const idVec3 dir,
float scale1,
float scale2 
) const

Definition at line 108 of file Sphere.cpp.

ID_INLINE void idSphere::SetOrigin ( const idVec3 o)

Definition at line 157 of file Sphere.h.

ID_INLINE void idSphere::SetRadius ( const float  r)

Definition at line 161 of file Sphere.h.

ID_INLINE idSphere idSphere::Translate ( const idVec3 translation) const

Definition at line 222 of file Sphere.h.

ID_INLINE idSphere & idSphere::TranslateSelf ( const idVec3 translation)

Definition at line 226 of file Sphere.h.

ID_INLINE void idSphere::Zero ( void  )

Definition at line 152 of file Sphere.h.

Member Data Documentation

idVec3 idSphere::origin
private

Definition at line 95 of file Sphere.h.

float idSphere::radius
private

Definition at line 96 of file Sphere.h.


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