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
idBox Class Reference

#include <Box.h>

Public Member Functions

 idBox (void)
 
 idBox (const idVec3 &center, const idVec3 &extents, const idMat3 &axis)
 
 idBox (const idVec3 &point)
 
 idBox (const idBounds &bounds)
 
 idBox (const idBounds &bounds, const idVec3 &origin, const idMat3 &axis)
 
idBox operator+ (const idVec3 &t) const
 
idBoxoperator+= (const idVec3 &t)
 
idBox operator* (const idMat3 &r) const
 
idBoxoperator*= (const idMat3 &r)
 
idBox operator+ (const idBox &a) const
 
idBoxoperator+= (const idBox &a)
 
idBox operator- (const idBox &a) const
 
idBoxoperator-= (const idBox &a)
 
bool Compare (const idBox &a) const
 
bool Compare (const idBox &a, const float epsilon) const
 
bool operator== (const idBox &a) const
 
bool operator!= (const idBox &a) const
 
void Clear (void)
 
void Zero (void)
 
const idVec3GetCenter (void) const
 
const idVec3GetExtents (void) const
 
const idMat3GetAxis (void) const
 
float GetVolume (void) const
 
bool IsCleared (void) const
 
bool AddPoint (const idVec3 &v)
 
bool AddBox (const idBox &a)
 
idBox Expand (const float d) const
 
idBoxExpandSelf (const float d)
 
idBox Translate (const idVec3 &translation) const
 
idBoxTranslateSelf (const idVec3 &translation)
 
idBox Rotate (const idMat3 &rotation) const
 
idBoxRotateSelf (const idMat3 &rotation)
 
float PlaneDistance (const idPlane &plane) const
 
int PlaneSide (const idPlane &plane, const float epsilon=ON_EPSILON) const
 
bool ContainsPoint (const idVec3 &p) const
 
bool IntersectsBox (const idBox &a) 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 FromBoxTranslation (const idBox &box, const idVec3 &translation)
 
void FromPointRotation (const idVec3 &point, const idRotation &rotation)
 
void FromBoxRotation (const idBox &box, const idRotation &rotation)
 
void ToPoints (idVec3 points[8]) const
 
idSphere ToSphere (void) const
 
void AxisProjection (const idVec3 &dir, float &min, float &max) const
 
void AxisProjection (const idMat3 &ax, idBounds &bounds) const
 
int GetProjectionSilhouetteVerts (const idVec3 &projectionOrigin, idVec3 silVerts[6]) const
 
int GetParallelProjectionSilhouetteVerts (const idVec3 &projectionDir, idVec3 silVerts[6]) const
 

Private Attributes

idVec3 center
 
idVec3 extents
 
idMat3 axis
 

Detailed Description

Definition at line 40 of file Box.h.

Constructor & Destructor Documentation

ID_INLINE idBox::idBox ( void  )

Definition at line 117 of file Box.h.

ID_INLINE idBox::idBox ( const idVec3 center,
const idVec3 extents,
const idMat3 axis 
)
explicit

Definition at line 120 of file Box.h.

ID_INLINE idBox::idBox ( const idVec3 point)
explicit

Definition at line 126 of file Box.h.

ID_INLINE idBox::idBox ( const idBounds bounds)
explicit

Definition at line 132 of file Box.h.

ID_INLINE idBox::idBox ( const idBounds bounds,
const idVec3 origin,
const idMat3 axis 
)
explicit

Definition at line 138 of file Box.h.

Member Function Documentation

bool idBox::AddBox ( const idBox a)

Definition at line 245 of file Box.cpp.

bool idBox::AddPoint ( const idVec3 v)

Definition at line 194 of file Box.cpp.

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

Definition at line 277 of file Box.h.

ID_INLINE void idBox::AxisProjection ( const idMat3 ax,
idBounds bounds 
) const

Definition at line 286 of file Box.h.

ID_INLINE void idBox::Clear ( void  )

Definition at line 201 of file Box.h.

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

Definition at line 185 of file Box.h.

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

Definition at line 189 of file Box.h.

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

Definition at line 263 of file Box.h.

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

Definition at line 233 of file Box.h.

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

Definition at line 237 of file Box.h.

void idBox::FromBoxRotation ( const idBox box,
const idRotation rotation 
)

Definition at line 752 of file Box.cpp.

void idBox::FromBoxTranslation ( const idBox box,
const idVec3 translation 
)

Definition at line 730 of file Box.cpp.

void idBox::FromPointRotation ( const idVec3 point,
const idRotation rotation 
)

Definition at line 741 of file Box.cpp.

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

Definition at line 637 of file Box.cpp.

void idBox::FromPointTranslation ( const idVec3 point,
const idVec3 translation 
)

Definition at line 719 of file Box.cpp.

ID_INLINE const idMat3 & idBox::GetAxis ( void  ) const

Definition at line 221 of file Box.h.

ID_INLINE const idVec3 & idBox::GetCenter ( void  ) const

Definition at line 213 of file Box.h.

ID_INLINE const idVec3 & idBox::GetExtents ( void  ) const

Definition at line 217 of file Box.h.

int idBox::GetParallelProjectionSilhouetteVerts ( const idVec3 projectionDir,
idVec3  silVerts[6] 
) const

Definition at line 822 of file Box.cpp.

int idBox::GetProjectionSilhouetteVerts ( const idVec3 projectionOrigin,
idVec3  silVerts[6] 
) const

Definition at line 787 of file Box.cpp.

ID_INLINE float idBox::GetVolume ( void  ) const

Definition at line 225 of file Box.h.

bool idBox::IntersectsBox ( const idBox a) const

Definition at line 376 of file Box.cpp.

ID_INLINE bool idBox::IsCleared ( void  ) const

Definition at line 229 of file Box.h.

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

Definition at line 538 of file Box.cpp.

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

Definition at line 197 of file Box.h.

ID_INLINE idBox idBox::operator* ( const idMat3 r) const

Definition at line 154 of file Box.h.

ID_INLINE idBox & idBox::operator*= ( const idMat3 r)

Definition at line 158 of file Box.h.

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

Definition at line 145 of file Box.h.

ID_INLINE idBox idBox::operator+ ( const idBox a) const

Definition at line 164 of file Box.h.

ID_INLINE idBox & idBox::operator+= ( const idVec3 t)

Definition at line 149 of file Box.h.

ID_INLINE idBox & idBox::operator+= ( const idBox a)

Definition at line 171 of file Box.h.

ID_INLINE idBox idBox::operator- ( const idBox a) const

Definition at line 176 of file Box.h.

ID_INLINE idBox & idBox::operator-= ( const idBox a)

Definition at line 180 of file Box.h.

ID_INLINE bool idBox::operator== ( const idBox a) const

Definition at line 193 of file Box.h.

float idBox::PlaneDistance ( const idPlane plane) const

Definition at line 332 of file Box.cpp.

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

Definition at line 354 of file Box.cpp.

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

Definition at line 614 of file Box.cpp.

ID_INLINE idBox idBox::Rotate ( const idMat3 rotation) const

Definition at line 253 of file Box.h.

ID_INLINE idBox & idBox::RotateSelf ( const idMat3 rotation)

Definition at line 257 of file Box.h.

void idBox::ToPoints ( idVec3  points[8]) const

Definition at line 761 of file Box.cpp.

ID_INLINE idSphere idBox::ToSphere ( void  ) const

Definition at line 273 of file Box.h.

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

Definition at line 244 of file Box.h.

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

Definition at line 248 of file Box.h.

ID_INLINE void idBox::Zero ( void  )

Definition at line 207 of file Box.h.

Member Data Documentation

idMat3 idBox::axis
private

Definition at line 112 of file Box.h.

idVec3 idBox::center
private

Definition at line 110 of file Box.h.

idVec3 idBox::extents
private

Definition at line 111 of file Box.h.


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