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 | Private Attributes | List of all members
idWinding2D Class Reference

#include <Winding2D.h>

Public Member Functions

 idWinding2D (void)
 
idWinding2Doperator= (const idWinding2D &winding)
 
const idVec2operator[] (const int index) const
 
idVec2operator[] (const int index)
 
void Clear (void)
 
void AddPoint (const idVec2 &point)
 
int GetNumPoints (void) const
 
void Expand (const float d)
 
void ExpandForAxialBox (const idVec2 bounds[2])
 
int Split (const idVec3 &plane, const float epsilon, idWinding2D **front, idWinding2D **back) const
 
bool ClipInPlace (const idVec3 &plane, const float epsilon=ON_EPSILON, const bool keepOn=false)
 
idWinding2DCopy (void) const
 
idWinding2DReverse (void) const
 
float GetArea (void) const
 
idVec2 GetCenter (void) const
 
float GetRadius (const idVec2 &center) const
 
void GetBounds (idVec2 bounds[2]) const
 
bool IsTiny (void) const
 
bool IsHuge (void) const
 
void Print (void) const
 
float PlaneDistance (const idVec3 &plane) const
 
int PlaneSide (const idVec3 &plane, const float epsilon=ON_EPSILON) const
 
bool PointInside (const idVec2 &point, const float epsilon) const
 
bool LineIntersection (const idVec2 &start, const idVec2 &end) const
 
bool RayIntersection (const idVec2 &start, const idVec2 &dir, float &scale1, float &scale2, int *edgeNums=NULL) const
 

Static Public Member Functions

static idVec3 Plane2DFromPoints (const idVec2 &start, const idVec2 &end, const bool normalize=false)
 
static idVec3 Plane2DFromVecs (const idVec2 &start, const idVec2 &dir, const bool normalize=false)
 
static bool Plane2DIntersection (const idVec3 &plane1, const idVec3 &plane2, idVec2 &point)
 

Private Attributes

int numPoints
 
idVec2 p [MAX_POINTS_ON_WINDING_2D]
 

Detailed Description

Definition at line 43 of file Winding2D.h.

Constructor & Destructor Documentation

ID_INLINE idWinding2D::idWinding2D ( void  )

Definition at line 93 of file Winding2D.h.

Member Function Documentation

ID_INLINE void idWinding2D::AddPoint ( const idVec2 point)

Definition at line 119 of file Winding2D.h.

ID_INLINE void idWinding2D::Clear ( void  )

Definition at line 115 of file Winding2D.h.

bool idWinding2D::ClipInPlace ( const idVec3 plane,
const float  epsilon = ON_EPSILON,
const bool  keepOn = false 
)

Definition at line 259 of file Winding2D.cpp.

idWinding2D * idWinding2D::Copy ( void  ) const

Definition at line 356 of file Winding2D.cpp.

void idWinding2D::Expand ( const float  d)

Definition at line 119 of file Winding2D.cpp.

void idWinding2D::ExpandForAxialBox ( const idVec2  bounds[2])

Definition at line 75 of file Winding2D.cpp.

float idWinding2D::GetArea ( void  ) const

Definition at line 387 of file Winding2D.cpp.

void idWinding2D::GetBounds ( idVec2  bounds[2]) const

Definition at line 444 of file Winding2D.cpp.

idVec2 idWinding2D::GetCenter ( void  ) const

Definition at line 406 of file Winding2D.cpp.

ID_INLINE int idWinding2D::GetNumPoints ( void  ) const

Definition at line 123 of file Winding2D.h.

float idWinding2D::GetRadius ( const idVec2 center) const

Definition at line 423 of file Winding2D.cpp.

bool idWinding2D::IsHuge ( void  ) const

Definition at line 498 of file Winding2D.cpp.

bool idWinding2D::IsTiny ( void  ) const

Definition at line 474 of file Winding2D.cpp.

bool idWinding2D::LineIntersection ( const idVec2 start,
const idVec2 end 
) const

Definition at line 623 of file Winding2D.cpp.

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

Definition at line 97 of file Winding2D.h.

ID_INLINE const idVec2 & idWinding2D::operator[] ( const int  index) const

Definition at line 107 of file Winding2D.h.

ID_INLINE idVec2 & idWinding2D::operator[] ( const int  index)

Definition at line 111 of file Winding2D.h.

ID_INLINE idVec3 idWinding2D::Plane2DFromPoints ( const idVec2 start,
const idVec2 end,
const bool  normalize = false 
)
static

Definition at line 127 of file Winding2D.h.

ID_INLINE idVec3 idWinding2D::Plane2DFromVecs ( const idVec2 start,
const idVec2 dir,
const bool  normalize = false 
)
static

Definition at line 138 of file Winding2D.h.

ID_INLINE bool idWinding2D::Plane2DIntersection ( const idVec3 plane1,
const idVec3 plane2,
idVec2 point 
)
static

Definition at line 149 of file Winding2D.h.

float idWinding2D::PlaneDistance ( const idVec3 plane) const

Definition at line 529 of file Winding2D.cpp.

int idWinding2D::PlaneSide ( const idVec3 plane,
const float  epsilon = ON_EPSILON 
) const

Definition at line 564 of file Winding2D.cpp.

bool idWinding2D::PointInside ( const idVec2 point,
const float  epsilon 
) const

Definition at line 603 of file Winding2D.cpp.

void idWinding2D::Print ( void  ) const

Definition at line 516 of file Winding2D.cpp.

bool idWinding2D::RayIntersection ( const idVec2 start,
const idVec2 dir,
float scale1,
float scale2,
int edgeNums = NULL 
) const

Definition at line 685 of file Winding2D.cpp.

idWinding2D * idWinding2D::Reverse ( void  ) const

Definition at line 370 of file Winding2D.cpp.

int idWinding2D::Split ( const idVec3 plane,
const float  epsilon,
idWinding2D **  front,
idWinding2D **  back 
) const

Definition at line 142 of file Winding2D.cpp.

Member Data Documentation

int idWinding2D::numPoints
private

Definition at line 89 of file Winding2D.h.

idVec2 idWinding2D::p[MAX_POINTS_ON_WINDING_2D]
private

Definition at line 90 of file Winding2D.h.


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