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

#include <Winding.h>

Inheritance diagram for idWinding:
idFixedWinding

Public Member Functions

 idWinding (void)
 
 idWinding (const int n)
 
 idWinding (const idVec3 *verts, const int n)
 
 idWinding (const idVec3 &normal, const float dist)
 
 idWinding (const idPlane &plane)
 
 idWinding (const idWinding &winding)
 
virtual ~idWinding (void)
 
idWindingoperator= (const idWinding &winding)
 
const idVec5operator[] (const int index) const
 
idVec5operator[] (const int index)
 
idWindingoperator+= (const idVec3 &v)
 
idWindingoperator+= (const idVec5 &v)
 
void AddPoint (const idVec3 &v)
 
void AddPoint (const idVec5 &v)
 
int GetNumPoints (void) const
 
void SetNumPoints (int n)
 
virtual void Clear (void)
 
void BaseForPlane (const idVec3 &normal, const float dist)
 
void BaseForPlane (const idPlane &plane)
 
int Split (const idPlane &plane, const float epsilon, idWinding **front, idWinding **back) const
 
idWindingClip (const idPlane &plane, const float epsilon=ON_EPSILON, const bool keepOn=false)
 
bool ClipInPlace (const idPlane &plane, const float epsilon=ON_EPSILON, const bool keepOn=false)
 
idWindingCopy (void) const
 
idWindingReverse (void) const
 
void ReverseSelf (void)
 
void RemoveEqualPoints (const float epsilon=ON_EPSILON)
 
void RemoveColinearPoints (const idVec3 &normal, const float epsilon=ON_EPSILON)
 
void RemovePoint (int point)
 
void InsertPoint (const idVec3 &point, int spot)
 
bool InsertPointIfOnEdge (const idVec3 &point, const idPlane &plane, const float epsilon=ON_EPSILON)
 
void AddToConvexHull (const idWinding *winding, const idVec3 &normal, const float epsilon=ON_EPSILON)
 
void AddToConvexHull (const idVec3 &point, const idVec3 &normal, const float epsilon=ON_EPSILON)
 
idWindingTryMerge (const idWinding &w, const idVec3 &normal, int keep=false) const
 
bool Check (bool print=true) const
 
float GetArea (void) const
 
idVec3 GetCenter (void) const
 
float GetRadius (const idVec3 &center) const
 
void GetPlane (idVec3 &normal, float &dist) const
 
void GetPlane (idPlane &plane) const
 
void GetBounds (idBounds &bounds) const
 
bool IsTiny (void) const
 
bool IsHuge (void) const
 
void Print (void) const
 
float PlaneDistance (const idPlane &plane) const
 
int PlaneSide (const idPlane &plane, const float epsilon=ON_EPSILON) const
 
bool PlanesConcave (const idWinding &w2, const idVec3 &normal1, const idVec3 &normal2, float dist1, float dist2) const
 
bool PointInside (const idVec3 &normal, const idVec3 &point, const float epsilon) const
 
bool LineIntersection (const idPlane &windingPlane, const idVec3 &start, const idVec3 &end, bool backFaceCull=false) const
 
bool RayIntersection (const idPlane &windingPlane, const idVec3 &start, const idVec3 &dir, float &scale, bool backFaceCull=false) const
 

Static Public Member Functions

static float TriangleArea (const idVec3 &a, const idVec3 &b, const idVec3 &c)
 

Protected Member Functions

bool EnsureAlloced (int n, bool keep=false)
 
virtual bool ReAllocate (int n, bool keep=false)
 

Protected Attributes

int numPoints
 
idVec5p
 
int allocedSize
 

Detailed Description

Definition at line 40 of file Winding.h.

Constructor & Destructor Documentation

ID_INLINE idWinding::idWinding ( void  )

Definition at line 132 of file Winding.h.

ID_INLINE idWinding::idWinding ( const int  n)
explicit

Definition at line 137 of file Winding.h.

ID_INLINE idWinding::idWinding ( const idVec3 verts,
const int  n 
)
explicit

Definition at line 143 of file Winding.h.

ID_INLINE idWinding::idWinding ( const idVec3 normal,
const float  dist 
)
explicit

Definition at line 159 of file Winding.h.

ID_INLINE idWinding::idWinding ( const idPlane plane)
explicit

Definition at line 165 of file Winding.h.

ID_INLINE idWinding::idWinding ( const idWinding winding)
explicit

Definition at line 171 of file Winding.h.

ID_INLINE idWinding::~idWinding ( void  )
virtual

Definition at line 183 of file Winding.h.

Member Function Documentation

ID_INLINE void idWinding::AddPoint ( const idVec3 v)

Definition at line 222 of file Winding.h.

ID_INLINE void idWinding::AddPoint ( const idVec5 v)

Definition at line 230 of file Winding.h.

void idWinding::AddToConvexHull ( const idWinding winding,
const idVec3 normal,
const float  epsilon = ON_EPSILON 
)

Definition at line 789 of file Winding.cpp.

void idWinding::AddToConvexHull ( const idVec3 point,
const idVec3 normal,
const float  epsilon = ON_EPSILON 
)

Definition at line 881 of file Winding.cpp.

void idWinding::BaseForPlane ( const idVec3 normal,
const float  dist 
)

Definition at line 66 of file Winding.cpp.

ID_INLINE void idWinding::BaseForPlane ( const idPlane plane)

Definition at line 255 of file Winding.h.

bool idWinding::Check ( bool  print = true) const

Definition at line 511 of file Winding.cpp.

ID_INLINE void idWinding::Clear ( void  )
virtual

Reimplemented in idFixedWinding.

Definition at line 249 of file Winding.h.

idWinding * idWinding::Clip ( const idPlane plane,
const float  epsilon = ON_EPSILON,
const bool  keepOn = false 
)

Definition at line 234 of file Winding.cpp.

bool idWinding::ClipInPlace ( const idPlane plane,
const float  epsilon = ON_EPSILON,
const bool  keepOn = false 
)

Definition at line 349 of file Winding.cpp.

idWinding * idWinding::Copy ( void  ) const

Definition at line 464 of file Winding.cpp.

ID_INLINE bool idWinding::EnsureAlloced ( int  n,
bool  keep = false 
)
protected

Definition at line 259 of file Winding.h.

float idWinding::GetArea ( void  ) const

Definition at line 598 of file Winding.cpp.

void idWinding::GetBounds ( idBounds bounds) const

Definition at line 700 of file Winding.cpp.

idVec3 idWinding::GetCenter ( void  ) const

Definition at line 639 of file Winding.cpp.

ID_INLINE int idWinding::GetNumPoints ( void  ) const

Definition at line 238 of file Winding.h.

void idWinding::GetPlane ( idVec3 normal,
float dist 
) const

Definition at line 656 of file Winding.cpp.

void idWinding::GetPlane ( idPlane plane) const

Definition at line 678 of file Winding.cpp.

float idWinding::GetRadius ( const idVec3 center) const

Definition at line 618 of file Winding.cpp.

void idWinding::InsertPoint ( const idVec3 point,
int  spot 
)

Definition at line 1121 of file Winding.cpp.

bool idWinding::InsertPointIfOnEdge ( const idVec3 point,
const idPlane plane,
const float  epsilon = ON_EPSILON 
)

Definition at line 1145 of file Winding.cpp.

bool idWinding::IsHuge ( void  ) const

Definition at line 1226 of file Winding.cpp.

bool idWinding::IsTiny ( void  ) const

Definition at line 1202 of file Winding.cpp.

bool idWinding::LineIntersection ( const idPlane windingPlane,
const idVec3 start,
const idVec3 end,
bool  backFaceCull = false 
) const

Definition at line 1379 of file Winding.cpp.

ID_INLINE idWinding & idWinding::operator+= ( const idVec3 v)

Definition at line 212 of file Winding.h.

ID_INLINE idWinding & idWinding::operator+= ( const idVec5 v)

Definition at line 217 of file Winding.h.

ID_INLINE idWinding & idWinding::operator= ( const idWinding winding)

Definition at line 188 of file Winding.h.

ID_INLINE const idVec5 & idWinding::operator[] ( const int  index) const

Definition at line 202 of file Winding.h.

ID_INLINE idVec5 & idWinding::operator[] ( const int  index)

Definition at line 207 of file Winding.h.

float idWinding::PlaneDistance ( const idPlane plane) const

Definition at line 1257 of file Winding.cpp.

bool idWinding::PlanesConcave ( const idWinding w2,
const idVec3 normal1,
const idVec3 normal2,
float  dist1,
float  dist2 
) const

Definition at line 1333 of file Winding.cpp.

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

Definition at line 1292 of file Winding.cpp.

bool idWinding::PointInside ( const idVec3 normal,
const idVec3 point,
const float  epsilon 
) const

Definition at line 1357 of file Winding.cpp.

void idWinding::Print ( void  ) const

Definition at line 1244 of file Winding.cpp.

bool idWinding::RayIntersection ( const idPlane windingPlane,
const idVec3 start,
const idVec3 dir,
float scale,
bool  backFaceCull = false 
) const

Definition at line 1419 of file Winding.cpp.

bool idWinding::ReAllocate ( int  n,
bool  keep = false 
)
protectedvirtual

Reimplemented in idFixedWinding.

Definition at line 44 of file Winding.cpp.

void idWinding::RemoveColinearPoints ( const idVec3 normal,
const float  epsilon = ON_EPSILON 
)

Definition at line 753 of file Winding.cpp.

void idWinding::RemoveEqualPoints ( const float  epsilon = ON_EPSILON)

Definition at line 733 of file Winding.cpp.

void idWinding::RemovePoint ( int  point)

Definition at line 1106 of file Winding.cpp.

idWinding * idWinding::Reverse ( void  ) const

Definition at line 478 of file Winding.cpp.

void idWinding::ReverseSelf ( void  )

Definition at line 495 of file Winding.cpp.

ID_INLINE void idWinding::SetNumPoints ( int  n)

Definition at line 242 of file Winding.h.

int idWinding::Split ( const idPlane plane,
const float  epsilon,
idWinding **  front,
idWinding **  back 
) const

Definition at line 92 of file Winding.cpp.

float idWinding::TriangleArea ( const idVec3 a,
const idVec3 b,
const idVec3 c 
)
static

Definition at line 1446 of file Winding.cpp.

idWinding * idWinding::TryMerge ( const idWinding w,
const idVec3 normal,
int  keep = false 
) const

Definition at line 998 of file Winding.cpp.

Member Data Documentation

int idWinding::allocedSize
protected

Definition at line 126 of file Winding.h.

int idWinding::numPoints
protected

Definition at line 124 of file Winding.h.

idVec5* idWinding::p
protected

Definition at line 125 of file Winding.h.


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