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

#include <Plane.h>

Public Member Functions

 idPlane (void)
 
 idPlane (float a, float b, float c, float d)
 
 idPlane (const idVec3 &normal, const float dist)
 
float operator[] (int index) const
 
floatoperator[] (int index)
 
idPlane operator- () const
 
idPlaneoperator= (const idVec3 &v)
 
idPlane operator+ (const idPlane &p) const
 
idPlane operator- (const idPlane &p) const
 
idPlaneoperator*= (const idMat3 &m)
 
bool Compare (const idPlane &p) const
 
bool Compare (const idPlane &p, const float epsilon) const
 
bool Compare (const idPlane &p, const float normalEps, const float distEps) const
 
bool operator== (const idPlane &p) const
 
bool operator!= (const idPlane &p) const
 
void Zero (void)
 
void SetNormal (const idVec3 &normal)
 
const idVec3Normal (void) const
 
idVec3Normal (void)
 
float Normalize (bool fixDegenerate=true)
 
bool FixDegenerateNormal (void)
 
bool FixDegeneracies (float distEpsilon)
 
float Dist (void) const
 
void SetDist (const float dist)
 
int Type (void) const
 
bool FromPoints (const idVec3 &p1, const idVec3 &p2, const idVec3 &p3, bool fixDegenerate=true)
 
bool FromVecs (const idVec3 &dir1, const idVec3 &dir2, const idVec3 &p, bool fixDegenerate=true)
 
void FitThroughPoint (const idVec3 &p)
 
bool HeightFit (const idVec3 *points, const int numPoints)
 
idPlane Translate (const idVec3 &translation) const
 
idPlaneTranslateSelf (const idVec3 &translation)
 
idPlane Rotate (const idVec3 &origin, const idMat3 &axis) const
 
idPlaneRotateSelf (const idVec3 &origin, const idMat3 &axis)
 
float Distance (const idVec3 &v) const
 
int Side (const idVec3 &v, const float epsilon=0.0f) const
 
bool LineIntersection (const idVec3 &start, const idVec3 &end) const
 
bool RayIntersection (const idVec3 &start, const idVec3 &dir, float &scale) const
 
bool PlaneIntersection (const idPlane &plane, idVec3 &start, idVec3 &dir) const
 
int GetDimension (void) const
 
const idVec4ToVec4 (void) const
 
idVec4ToVec4 (void)
 
const floatToFloatPtr (void) const
 
floatToFloatPtr (void)
 
const char * ToString (int precision=2) const
 

Private Attributes

float a
 
float b
 
float c
 
float d
 

Detailed Description

Definition at line 71 of file Plane.h.

Constructor & Destructor Documentation

ID_INLINE idPlane::idPlane ( void  )

Definition at line 137 of file Plane.h.

ID_INLINE idPlane::idPlane ( float  a,
float  b,
float  c,
float  d 
)

Definition at line 140 of file Plane.h.

ID_INLINE idPlane::idPlane ( const idVec3 normal,
const float  dist 
)

Definition at line 147 of file Plane.h.

Member Function Documentation

ID_INLINE bool idPlane::Compare ( const idPlane p) const

Definition at line 187 of file Plane.h.

ID_INLINE bool idPlane::Compare ( const idPlane p,
const float  epsilon 
) const

Definition at line 191 of file Plane.h.

ID_INLINE bool idPlane::Compare ( const idPlane p,
const float  normalEps,
const float  distEps 
) const

Definition at line 211 of file Plane.h.

ID_INLINE float idPlane::Dist ( void  ) const

Definition at line 271 of file Plane.h.

ID_INLINE float idPlane::Distance ( const idVec3 v) const

Definition at line 324 of file Plane.h.

ID_INLINE void idPlane::FitThroughPoint ( const idVec3 p)

Definition at line 297 of file Plane.h.

ID_INLINE bool idPlane::FixDegeneracies ( float  distEpsilon)

Definition at line 260 of file Plane.h.

ID_INLINE bool idPlane::FixDegenerateNormal ( void  )

Definition at line 256 of file Plane.h.

ID_INLINE bool idPlane::FromPoints ( const idVec3 p1,
const idVec3 p2,
const idVec3 p3,
bool  fixDegenerate = true 
)

Definition at line 279 of file Plane.h.

ID_INLINE bool idPlane::FromVecs ( const idVec3 dir1,
const idVec3 dir2,
const idVec3 p,
bool  fixDegenerate = true 
)

Definition at line 288 of file Plane.h.

ID_INLINE int idPlane::GetDimension ( void  ) const

Definition at line 371 of file Plane.h.

bool idPlane::HeightFit ( const idVec3 points,
const int  numPoints 
)

Definition at line 72 of file Plane.cpp.

ID_INLINE bool idPlane::LineIntersection ( const idVec3 start,
const idVec3 end 
) const

Definition at line 341 of file Plane.h.

ID_INLINE const idVec3 & idPlane::Normal ( void  ) const

Definition at line 239 of file Plane.h.

ID_INLINE idVec3 & idPlane::Normal ( void  )

Definition at line 243 of file Plane.h.

ID_INLINE float idPlane::Normalize ( bool  fixDegenerate = true)

Definition at line 247 of file Plane.h.

ID_INLINE bool idPlane::operator!= ( const idPlane p) const

Definition at line 225 of file Plane.h.

ID_INLINE idPlane & idPlane::operator*= ( const idMat3 m)

Definition at line 182 of file Plane.h.

ID_INLINE idPlane idPlane::operator+ ( const idPlane p) const

Definition at line 174 of file Plane.h.

ID_INLINE idPlane idPlane::operator- ( ) const

Definition at line 162 of file Plane.h.

ID_INLINE idPlane idPlane::operator- ( const idPlane p) const

Definition at line 178 of file Plane.h.

ID_INLINE idPlane & idPlane::operator= ( const idVec3 v)

Definition at line 166 of file Plane.h.

ID_INLINE bool idPlane::operator== ( const idPlane p) const

Definition at line 221 of file Plane.h.

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

Definition at line 154 of file Plane.h.

ID_INLINE float & idPlane::operator[] ( int  index)

Definition at line 158 of file Plane.h.

bool idPlane::PlaneIntersection ( const idPlane plane,
idVec3 start,
idVec3 dir 
) const

Definition at line 126 of file Plane.cpp.

ID_INLINE bool idPlane::RayIntersection ( const idVec3 start,
const idVec3 dir,
float scale 
) const

Definition at line 359 of file Plane.h.

ID_INLINE idPlane idPlane::Rotate ( const idVec3 origin,
const idMat3 axis 
) const

Definition at line 310 of file Plane.h.

ID_INLINE idPlane & idPlane::RotateSelf ( const idVec3 origin,
const idMat3 axis 
)

Definition at line 317 of file Plane.h.

ID_INLINE void idPlane::SetDist ( const float  dist)

Definition at line 275 of file Plane.h.

ID_INLINE void idPlane::SetNormal ( const idVec3 normal)

Definition at line 233 of file Plane.h.

ID_INLINE int idPlane::Side ( const idVec3 v,
const float  epsilon = 0.0f 
) const

Definition at line 328 of file Plane.h.

ID_INLINE const float * idPlane::ToFloatPtr ( void  ) const

Definition at line 383 of file Plane.h.

ID_INLINE float * idPlane::ToFloatPtr ( void  )

Definition at line 387 of file Plane.h.

const char * idPlane::ToString ( int  precision = 2) const

Definition at line 152 of file Plane.cpp.

ID_INLINE const idVec4 & idPlane::ToVec4 ( void  ) const

Definition at line 375 of file Plane.h.

ID_INLINE idVec4 & idPlane::ToVec4 ( void  )

Definition at line 379 of file Plane.h.

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

Definition at line 301 of file Plane.h.

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

Definition at line 305 of file Plane.h.

int idPlane::Type ( void  ) const

Definition at line 39 of file Plane.cpp.

ID_INLINE void idPlane::Zero ( void  )

Definition at line 229 of file Plane.h.

Member Data Documentation

float idPlane::a
private

Definition at line 128 of file Plane.h.

float idPlane::b
private

Definition at line 129 of file Plane.h.

float idPlane::c
private

Definition at line 130 of file Plane.h.

float idPlane::d
private

Definition at line 131 of file Plane.h.


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