#include <K3dBoxBuild.h>
Inheritance diagram for K3dBoxBuild:
Public Member Functions | |
K3dBoxBuild (K3dGameData *_pGameData) | |
~K3dBoxBuild () | |
K3dPolyObj * | CreateSceneBox () |
Create bounding box for whole scene. | |
void | DeleteBoxes () |
Delete all bounding boxes. | |
K3dLineObj * | CreateEdge (K3dVector3Obj *_pOrigin, K3dVector3Obj *_pDirection) |
Create new edge. | |
K3dPolyPlane * | CreatePlane (const K3dVector3Obj *_pV0, const K3dVector3Obj *_pV1, const K3dVector3Obj *_pV2) |
Create polyhedron plane from three vectors. | |
bool & | GetIsVisible () |
Is visible the box ? | |
Private Attributes | |
K3dGameData * | m_pGameData |
Global game data, data centered game system. | |
bool | m_bIsVisible |
Is box visible ? | |
K3dPolyObj * | m_pPoly |
Polyhedron object. | |
K3dIntersection * | m_pIntersection |
Pointer to intersection calculation. | |
K3dPolyPlaneBuild * | m_pPolyPlaneBuild |
Pointer to polyhedron plane builder. | |
K3dLineBuild * | m_pLineBuild |
Pointer to ray builder. | |
K3dVertexBuild * | m_pVertexBuild |
Pointer to vertex builder. |
Definition at line 50 of file K3dBoxBuild.h.
K3dBoxBuild::K3dBoxBuild | ( | K3dGameData * | _pGameData | ) |
Definition at line 35 of file K3dBoxBuild.cpp.
References K3dSceneData::GetIntersection(), K3dSceneData::GetLineBuild(), K3dSceneData::GetPolyPlaneBuild(), K3dSceneData::GetVertexBuild(), m_pGameData, m_pIntersection, m_pLineBuild, m_pPolyPlaneBuild, m_pVertexBuild, and K3dSceneData::SetBoxBuild().
K3dBoxBuild::~K3dBoxBuild | ( | ) |
K3dPolyObj * K3dBoxBuild::CreateSceneBox | ( | ) |
Create bounding box for whole scene.
*this | Whole scene bounding box |
Definition at line 79 of file K3dBoxBuild.cpp.
References K3dPoly::AddEdge(), K3dPoly::AddPlane(), K3dPoly::AddVertex(), CreateEdge(), K3dVertexBuild::CreateNewVertexObj(), CreatePlane(), K3dPolyObj::GetId(), K3dPolyObj::GetIsVisible(), K3dSafePointer< _T >::GetNum(), K3dGameData::GetPolyObjSP(), K3dVertex::GetPosition(), K_MAX_SCENE_LENGTH, m_bIsVisible, m_pGameData, m_pPoly, m_pVertexBuild, K3dSafePointer< _T >::New(), and K3dVector3::Set().
void K3dBoxBuild::DeleteBoxes | ( | ) |
Delete all bounding boxes.
Definition at line 166 of file K3dBoxBuild.cpp.
References K3dSafePointer< _T >::Delete(), K3dSafePointer< _T >::Get(), K3dSafePointer< _T >::GetNum(), K3dGameData::GetPolyObjSP(), and m_pGameData.
Referenced by ~K3dBoxBuild().
K3dLineObj * K3dBoxBuild::CreateEdge | ( | K3dVector3Obj * | _pOrigin, | |
K3dVector3Obj * | _pDirection | |||
) |
Create new edge.
_pOrigin | Edge origin vector | |
_pDirection | Edge direction vector |
Definition at line 55 of file K3dBoxBuild.cpp.
References K3dLineBuild::CreateNewLineObj(), K3dLineObj::GetIsVisible(), K3dLineMove::Init(), m_bIsVisible, m_pLineBuild, K3dRay::SetDirection(), and K3dRay::SetOrigin().
Referenced by K3dCutPoly::CalcNewEdges(), and CreateSceneBox().
K3dPolyPlane * K3dBoxBuild::CreatePlane | ( | const K3dVector3Obj * | _pV0, | |
const K3dVector3Obj * | _pV1, | |||
const K3dVector3Obj * | _pV2 | |||
) |
Create polyhedron plane from three vectors.
Definition at line 66 of file K3dBoxBuild.cpp.
References K3dPolyPlaneBuild::CalcVertsOnPlane(), K3dPolyPlaneBuild::CreateNewPolyPlaneObj(), K3dPlaneVis::GetHeight(), K3dPlaneObj::GetIsVisible(), K3dPlaneVis::GetWidth(), K3D_PLANE_SIZE, m_bIsVisible, and m_pPolyPlaneBuild.
Referenced by CreateSceneBox().
bool& K3dBoxBuild::GetIsVisible | ( | ) | [inline] |
K3dGameData* K3dBoxBuild::m_pGameData [private] |
Global game data, data centered game system.
Reimplemented from K3dBoxWork.
Reimplemented in K3dObjectBuild, K3dScene, K3dMngGeometry, and K3dMngSystem.
Definition at line 53 of file K3dBoxBuild.h.
Referenced by CreateSceneBox(), DeleteBoxes(), and K3dBoxBuild().
bool K3dBoxBuild::m_bIsVisible [private] |
Is box visible ?
Definition at line 54 of file K3dBoxBuild.h.
Referenced by CreateEdge(), CreatePlane(), CreateSceneBox(), and GetIsVisible().
K3dPolyObj* K3dBoxBuild::m_pPoly [private] |
K3dIntersection* K3dBoxBuild::m_pIntersection [private] |
Pointer to intersection calculation.
Definition at line 56 of file K3dBoxBuild.h.
Referenced by K3dBoxBuild().
K3dPolyPlaneBuild* K3dBoxBuild::m_pPolyPlaneBuild [private] |
Pointer to polyhedron plane builder.
Definition at line 57 of file K3dBoxBuild.h.
Referenced by CreatePlane(), and K3dBoxBuild().
K3dLineBuild* K3dBoxBuild::m_pLineBuild [private] |
Pointer to ray builder.
Definition at line 58 of file K3dBoxBuild.h.
Referenced by CreateEdge(), and K3dBoxBuild().
K3dVertexBuild* K3dBoxBuild::m_pVertexBuild [private] |
Pointer to vertex builder.
Definition at line 59 of file K3dBoxBuild.h.
Referenced by CreateSceneBox(), and K3dBoxBuild().