#include <K3dTriangleWork.h>
Inheritance diagram for K3dTriangleWork:
Public Member Functions | |
K3dTriangleWork (K3dGameData *_pGameData) | |
~K3dTriangleWork (void) | |
K3dVector3Obj & | CalcTriangleCentre (const int _iTriangleId) |
Calculate triangle centre of gravity. | |
void | CalcScale (const int _iTriangleId, const float fDistance) |
Scale triangle. | |
K3dVector3Obj & | CalcNormal (const int _iTriangleId) |
Calculate triangle normal vector. | |
Private Attributes | |
K3dGameData * | m_pGameData |
Global game data, data centered game system. |
Definition at line 38 of file K3dTriangleWork.h.
K3dTriangleWork::K3dTriangleWork | ( | K3dGameData * | _pGameData | ) |
Definition at line 35 of file K3dTriangleWork.cpp.
References m_pGameData, and K3dSceneData::SetTriangleWork().
K3dTriangleWork::~K3dTriangleWork | ( | void | ) |
Definition at line 42 of file K3dTriangleWork.cpp.
K3dVector3Obj & K3dTriangleWork::CalcTriangleCentre | ( | const int | _iTriangleId | ) |
Calculate triangle centre of gravity.
Definition at line 47 of file K3dTriangleWork.cpp.
References K3dVector3Work::CalcCentre(), K3dSafePointer< _T >::Get(), K3dTriangle::GetCentre(), K3dGameData::GetTriangleObjSP(), K3dSceneData::GetVector3Work(), K3dTriangle::GetVertex(), and m_pGameData.
Referenced by CalcScale(), and K3dTriangleBuild::CreateNewTriangleObj().
void K3dTriangleWork::CalcScale | ( | const int | _iTriangleId, | |
const float | fDistance | |||
) |
Scale triangle.
Definition at line 57 of file K3dTriangleWork.cpp.
References CalcTriangleCentre(), K3dSafePointer< _T >::Get(), K3dGameData::GetTriangleObjSP(), K3dSceneData::GetVector3Work(), K3dTriangle::GetVertex(), m_pGameData, K3dVector3Work::Normalize(), and K3dVector3Work::Translate().
K3dVector3Obj & K3dTriangleWork::CalcNormal | ( | const int | _iTriangleId | ) |
Calculate triangle normal vector.
Definition at line 94 of file K3dTriangleWork.cpp.
References K3dSafePointer< _T >::Get(), K3dTriangle::GetNormal(), K3dGameData::GetTriangleObjSP(), K3dSceneData::GetVector3Work(), K3dTriangle::GetVertex(), m_pGameData, and K3dVector3Work::Normal().
Referenced by K3dTriangleBuild::CreateNewTriangleObj().
K3dGameData* K3dTriangleWork::m_pGameData [private] |
Global game data, data centered game system.
Reimplemented in K3dObjectBuild, K3dTriangleBuild, K3dScene, K3dMngGeometry, and K3dMngSystem.
Definition at line 40 of file K3dTriangleWork.h.
Referenced by CalcNormal(), CalcScale(), CalcTriangleCentre(), and K3dTriangleWork().