#include <K3dTriangulation.h>
Inheritance diagram for K3dTriangulation:
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 | |
K3dGameData * | m_pGameData |
Global game data, data centered game system. | |
K3dBoxWork * | m_pBoxWork |
Pointer to box worker. | |
K3dVector3Build * | m_pVector3Build |
Pointer to 3d vector builder. | |
K3dTriangleBuild * | m_pTriangleBuild |
Pointer to triangle builder. |
Definition at line 39 of file K3dTriangulation.h.
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.
void K3dTriangulation::SortVector3ArrayByAngle | ( | K3dPolyPlane * | _pPolyPlane | ) | [private] |
Sort vertex array by angle.
_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.
_rvVertex | Input vertex array |
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().
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().
Pointer to triangle builder.
Definition at line 44 of file K3dTriangulation.h.
Referenced by CreateNewTriangle(), and K3dTriangulation().