K3dTriangulation Class Reference

#include <K3dTriangulation.h>

Inheritance diagram for K3dTriangulation:

K3dConvex K3dTools K3dMngGeometry K3dMngSystem K3dScene List of all members.

Public Member Functions

 K3dTriangulation (K3dGameData *_pGameData)
 ~K3dTriangulation ()
void BuildTriangles ()
 Build triangle by vertex triangulation. Triangles generated from face vertex array.

Private Member Functions

void SortVector3ArrayByAngle (K3dPolyPlane *_pPolyPlane)
 Sort vertex array by angle.
void CreateNewTriangle (K3dVector3Obj *_pV0, K3dVector3Obj *_pV1, K3dVector3Obj *_pV2, const K3dVector3Obj *_pNormal)
 Create new triangle.
void TriangulatePolyPlane (K3dPolyPlane *_pPolyPlane)
 Triangulate polyhedron plane. Triangulation algorithm is (0,1,2 -> 0,2,3 -> 0,3,4 -> etc.).
void TriangulatePoly (K3dPolyObj *_pPoly)
 Triangulate polyhedron Input polyhedron.
void Triangulate (const TVertexArray &_rvVertex)
 Triangulate vertex array.

Private Attributes

K3dGameDatam_pGameData
 Global game data, data centered game system.
K3dBoxWorkm_pBoxWork
 Pointer to box worker.
K3dVector3Buildm_pVector3Build
 Pointer to 3d vector builder.
K3dTriangleBuildm_pTriangleBuild
 Pointer to triangle builder.

Detailed Description

Definition at line 39 of file K3dTriangulation.h.


Constructor & Destructor Documentation

K3dTriangulation::K3dTriangulation ( K3dGameData _pGameData  ) 

Definition at line 36 of file K3dTriangulation.cpp.

References K3dSceneData::GetBoxWork(), K3dSceneData::GetTriangleBuild(), K3dSceneData::GetVector3Build(), m_pBoxWork, m_pGameData, m_pTriangleBuild, and m_pVector3Build.

K3dTriangulation::~K3dTriangulation (  ) 

Definition at line 44 of file K3dTriangulation.cpp.


Member Function Documentation

void K3dTriangulation::SortVector3ArrayByAngle ( K3dPolyPlane _pPolyPlane  )  [private]

Sort vertex array by angle.

Parameters:
_pPolyPlane Polyhedron plane with vertex array for sorting

Definition at line 67 of file K3dTriangulation.cpp.

References K3dVector3Work::AngleBetweenVectors(), K3dVector3Work::CalcVectorArrayCentre(), K3dPolyPlane::GetOnPlaneVertexArray(), m_pVector3Build, and K3dVector3::Reset().

Referenced by TriangulatePolyPlane().

void K3dTriangulation::CreateNewTriangle ( K3dVector3Obj _pV0,
K3dVector3Obj _pV1,
K3dVector3Obj _pV2,
const K3dVector3Obj _pNormal 
) [private]

Create new triangle.

Definition at line 50 of file K3dTriangulation.cpp.

References K3dTriangleBuild::CreateNewTriangleObj(), m_pTriangleBuild, m_pVector3Build, and K3dVector3Work::Normal().

Referenced by TriangulatePolyPlane().

void K3dTriangulation::TriangulatePolyPlane ( K3dPolyPlane _pPolyPlane  )  [private]

Triangulate polyhedron plane. Triangulation algorithm is (0,1,2 -> 0,2,3 -> 0,3,4 -> etc.).

Definition at line 107 of file K3dTriangulation.cpp.

References CreateNewTriangle(), K3dPlane::GetNormal(), K3dPolyPlane::GetOnPlaneVertexArray(), and SortVector3ArrayByAngle().

Referenced by TriangulatePoly().

void K3dTriangulation::TriangulatePoly ( K3dPolyObj _pPoly  )  [private]

Triangulate polyhedron Input polyhedron.

Definition at line 131 of file K3dTriangulation.cpp.

References K3dPoly::GetPlaneArray(), and TriangulatePolyPlane().

Referenced by Triangulate().

void K3dTriangulation::Triangulate ( const TVertexArray _rvVertex  )  [private]

Triangulate vertex array.

Parameters:
_rvVertex Input vertex array
Return values:
m_tVertexArray Return triangulated vertex array

Definition at line 145 of file K3dTriangulation.cpp.

References K3dConvex::CreatePolyFromVertexArray(), and TriangulatePoly().

Referenced by BuildTriangles().

void K3dTriangulation::BuildTriangles (  ) 

Build triangle by vertex triangulation. Triangles generated from face vertex array.

Definition at line 154 of file K3dTriangulation.cpp.

References K3dSafePointer< _T >::Get(), K3dGameData::GetFaceObjSP(), K3dSafePointer< _T >::GetNum(), m_pGameData, and Triangulate().

Referenced by K3dMngGeometry::InitMngGeometry().


Member Data Documentation

K3dGameData* K3dTriangulation::m_pGameData [private]

Global game data, data centered game system.

Reimplemented from K3dConvex.

Reimplemented in K3dScene, K3dMngGeometry, K3dMngSystem, and K3dTools.

Definition at line 41 of file K3dTriangulation.h.

Referenced by BuildTriangles(), and K3dTriangulation().

K3dBoxWork* K3dTriangulation::m_pBoxWork [private]

Pointer to box worker.

Definition at line 42 of file K3dTriangulation.h.

Referenced by K3dTriangulation().

K3dVector3Build* K3dTriangulation::m_pVector3Build [private]

Pointer to 3d vector builder.

Definition at line 43 of file K3dTriangulation.h.

Referenced by CreateNewTriangle(), K3dTriangulation(), and SortVector3ArrayByAngle().

K3dTriangleBuild* K3dTriangulation::m_pTriangleBuild [private]

Pointer to triangle builder.

Definition at line 44 of file K3dTriangulation.h.

Referenced by CreateNewTriangle(), and K3dTriangulation().


The documentation for this class was generated from the following files:
Generated on Thu Aug 16 23:53:34 2007 for K3dEngine by  doxygen 1.5.0