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

#include <Surface_Patch.h>

Inheritance diagram for idSurface_Patch:
idSurface idMapPatch

Public Member Functions

 idSurface_Patch (void)
 
 idSurface_Patch (int maxPatchWidth, int maxPatchHeight)
 
 idSurface_Patch (const idSurface_Patch &patch)
 
 ~idSurface_Patch (void)
 
void SetSize (int patchWidth, int patchHeight)
 
int GetWidth (void) const
 
int GetHeight (void) const
 
void Subdivide (float maxHorizontalError, float maxVerticalError, float maxLength, bool genNormals=false)
 
void SubdivideExplicit (int horzSubdivisions, int vertSubdivisions, bool genNormals, bool removeLinear=false)
 
- Public Member Functions inherited from idSurface
 idSurface (void)
 
 idSurface (const idSurface &surf)
 
 idSurface (const idDrawVert *verts, const int numVerts, const int *indexes, const int numIndexes)
 
 ~idSurface (void)
 
const idDrawVertoperator[] (const int index) const
 
idDrawVertoperator[] (const int index)
 
idSurfaceoperator+= (const idSurface &surf)
 
int GetNumIndexes (void) const
 
const intGetIndexes (void) const
 
int GetNumVertices (void) const
 
const idDrawVertGetVertices (void) const
 
const intGetEdgeIndexes (void) const
 
const surfaceEdge_tGetEdges (void) const
 
void Clear (void)
 
void SwapTriangles (idSurface &surf)
 
void TranslateSelf (const idVec3 &translation)
 
void RotateSelf (const idMat3 &rotation)
 
int Split (const idPlane &plane, const float epsilon, idSurface **front, idSurface **back, int *frontOnPlaneEdges=NULL, int *backOnPlaneEdges=NULL) const
 
bool ClipInPlace (const idPlane &plane, const float epsilon=ON_EPSILON, const bool keepOn=false)
 
bool IsConnected (void) const
 
bool IsClosed (void) const
 
bool IsPolytope (const float epsilon=0.1f) const
 
float PlaneDistance (const idPlane &plane) const
 
int PlaneSide (const idPlane &plane, const float epsilon=ON_EPSILON) const
 
bool LineIntersection (const idVec3 &start, const idVec3 &end, bool backFaceCull=false) const
 
bool RayIntersection (const idVec3 &start, const idVec3 &dir, float &scale, bool backFaceCull=false) const
 

Protected Attributes

int width
 
int height
 
int maxWidth
 
int maxHeight
 
bool expanded
 
- Protected Attributes inherited from idSurface
idList< idDrawVertverts
 
idList< intindexes
 
idList< surfaceEdge_tedges
 
idList< intedgeIndexes
 

Private Member Functions

void PutOnCurve (void)
 
void RemoveLinearColumnsRows (void)
 
void ResizeExpanded (int height, int width)
 
void Expand (void)
 
void Collapse (void)
 
void ProjectPointOntoVector (const idVec3 &point, const idVec3 &vStart, const idVec3 &vEnd, idVec3 &vProj)
 
void GenerateNormals (void)
 
void GenerateIndexes (void)
 
void LerpVert (const idDrawVert &a, const idDrawVert &b, idDrawVert &out) const
 
void SampleSinglePatchPoint (const idDrawVert ctrl[3][3], float u, float v, idDrawVert *out) const
 
void SampleSinglePatch (const idDrawVert ctrl[3][3], int baseCol, int baseRow, int width, int horzSub, int vertSub, idDrawVert *outVerts) const
 

Additional Inherited Members

- Protected Member Functions inherited from idSurface
void GenerateEdgeIndexes (void)
 
int FindEdge (int v1, int v2) const
 

Detailed Description

Definition at line 40 of file Surface_Patch.h.

Constructor & Destructor Documentation

ID_INLINE idSurface_Patch::idSurface_Patch ( void  )

Definition at line 93 of file Surface_Patch.h.

ID_INLINE idSurface_Patch::idSurface_Patch ( int  maxPatchWidth,
int  maxPatchHeight 
)

Definition at line 103 of file Surface_Patch.h.

ID_INLINE idSurface_Patch::idSurface_Patch ( const idSurface_Patch patch)

Definition at line 116 of file Surface_Patch.h.

ID_INLINE idSurface_Patch::~idSurface_Patch ( void  )

Definition at line 125 of file Surface_Patch.h.

Member Function Documentation

void idSurface_Patch::Collapse ( void  )
private

Definition at line 182 of file Surface_Patch.cpp.

void idSurface_Patch::Expand ( void  )
private

Definition at line 204 of file Surface_Patch.cpp.

void idSurface_Patch::GenerateIndexes ( void  )
private

Definition at line 392 of file Surface_Patch.cpp.

void idSurface_Patch::GenerateNormals ( void  )
private

Definition at line 247 of file Surface_Patch.cpp.

ID_INLINE int idSurface_Patch::GetHeight ( void  ) const

Definition at line 142 of file Surface_Patch.h.

ID_INLINE int idSurface_Patch::GetWidth ( void  ) const

Definition at line 133 of file Surface_Patch.h.

void idSurface_Patch::LerpVert ( const idDrawVert a,
const idDrawVert b,
idDrawVert out 
) const
private

Definition at line 226 of file Surface_Patch.cpp.

void idSurface_Patch::ProjectPointOntoVector ( const idVec3 point,
const idVec3 vStart,
const idVec3 vEnd,
idVec3 vProj 
)
private

Definition at line 85 of file Surface_Patch.cpp.

void idSurface_Patch::PutOnCurve ( void  )
private

Definition at line 57 of file Surface_Patch.cpp.

void idSurface_Patch::RemoveLinearColumnsRows ( void  )
private

Definition at line 102 of file Surface_Patch.cpp.

void idSurface_Patch::ResizeExpanded ( int  height,
int  width 
)
private

Definition at line 157 of file Surface_Patch.cpp.

void idSurface_Patch::SampleSinglePatch ( const idDrawVert  ctrl[3][3],
int  baseCol,
int  baseRow,
int  width,
int  horzSub,
int  vertSub,
idDrawVert outVerts 
) const
private

Definition at line 477 of file Surface_Patch.cpp.

void idSurface_Patch::SampleSinglePatchPoint ( const idDrawVert  ctrl[3][3],
float  u,
float  v,
idDrawVert out 
) const
private

Definition at line 420 of file Surface_Patch.cpp.

void idSurface_Patch::SetSize ( int  patchWidth,
int  patchHeight 
)

Definition at line 38 of file Surface_Patch.cpp.

void idSurface_Patch::Subdivide ( float  maxHorizontalError,
float  maxVerticalError,
float  maxLength,
bool  genNormals = false 
)

Definition at line 555 of file Surface_Patch.cpp.

void idSurface_Patch::SubdivideExplicit ( int  horzSubdivisions,
int  vertSubdivisions,
bool  genNormals,
bool  removeLinear = false 
)

Definition at line 497 of file Surface_Patch.cpp.

Member Data Documentation

bool idSurface_Patch::expanded
protected

Definition at line 62 of file Surface_Patch.h.

int idSurface_Patch::height
protected

Definition at line 59 of file Surface_Patch.h.

int idSurface_Patch::maxHeight
protected

Definition at line 61 of file Surface_Patch.h.

int idSurface_Patch::maxWidth
protected

Definition at line 60 of file Surface_Patch.h.

int idSurface_Patch::width
protected

Definition at line 58 of file Surface_Patch.h.


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