#include <K3dAim.h>
Inheritance diagram for K3dAim:

Public Member Functions | |
| K3dAim (K3dGameData *_pGameData) | |
| ~K3dAim () | |
| void | CreateAimRay () |
| Create aiming ray and add to the global data. | |
| void | CalcAimRay () |
| Calculate aming ray. | |
| float & | GetAverage () |
| Get or set aiming average between near and far plane. | |
| float & | GetFarDist () |
| Get or set far plane distance. | |
Private Member Functions | |
| void | CalcAimRayAverage (const float _fFarDist) |
| Calculate average. | |
Private Attributes | |
| K3dGameData * | m_pGameData |
| Global game data, data centered game system. | |
| float | m_fAverage |
| Average between near plane (width, height) and far plane (width, height). | |
| float | m_fFarDist |
| Far plane distance. | |
| K3dRayObj * | m_pRay |
| Aiming ray. | |
| K3dRayBuild * | m_pRayBuild |
| Pointer to ray builder. | |
Definition at line 43 of file K3dAim.h.
| K3dAim::K3dAim | ( | K3dGameData * | _pGameData | ) |
Definition at line 35 of file K3dAim.cpp.
References K3dSceneData::GetRayBuild(), m_pGameData, and m_pRayBuild.
| K3dAim::~K3dAim | ( | ) |
Definition at line 41 of file K3dAim.cpp.
| void K3dAim::CalcAimRayAverage | ( | const float | _fFarDist | ) | [private] |
Calculate average.
Definition at line 48 of file K3dAim.cpp.
References K3dMath::ATan(), K3dOptionsData::GetGraphicOption(), TGraphicOption::iFovy, TGraphicOption::iWidth, m_fAverage, m_fFarDist, and m_pGameData.
Referenced by CreateAimRay().
| void K3dAim::CreateAimRay | ( | ) |
Create aiming ray and add to the global data.
Definition at line 117 of file K3dAim.cpp.
References CalcAimRay(), CalcAimRayAverage(), K3dRayBuild::CreateNewRayObj(), K3dRayData::GetAimRayId(), K3dOptionsData::GetGraphicOption(), K3dSafePointer< _T >::GetNum(), K3dGameData::GetRayObjSP(), TGraphicOption::iFarPlane, m_pGameData, m_pRay, and m_pRayBuild.
Referenced by K3dMngGeometry::InitMngGeometry().
| void K3dAim::CalcAimRay | ( | ) |
Calculate aming ray.
| K3dRay | Returns aming ray for calculating ray (sphere, box, plane ...) intersection |
Definition at line 67 of file K3dAim.cpp.
References K3dSafePointer< _T >::Get(), K3dCameraData::GetActiveCamId(), K3dRayData::GetAimRayId(), K3dGameData::GetCameraObjSP(), K3dCamera::GetCameraPos(), K3dRay::GetDirection(), K3dOptionsData::GetGraphicOption(), K3dSceneData::GetMouse(), K3dMouse::GetMousePosition(), K3dRay::GetOrigin(), K3dGameData::GetRayObjSP(), K3dCamera::GetRight(), K3dCamera::GetUp(), K3dCamera::GetView(), TGraphicOption::iHeight, TGraphicOption::iWidth, m_fAverage, m_fFarDist, m_pGameData, and m_pRay.
Referenced by CreateAimRay(), and K3dMngGeometry::UpdateMngGeometry().
| float& K3dAim::GetAverage | ( | ) | [inline] |
Get or set aiming average between near and far plane.
Definition at line 63 of file K3dAim.h.
References m_fAverage.
| float& K3dAim::GetFarDist | ( | ) | [inline] |
K3dGameData* K3dAim::m_pGameData [private] |
Global game data, data centered game system.
Reimplemented in K3dScene, K3dMngGeometry, and K3dMngSystem.
Definition at line 45 of file K3dAim.h.
Referenced by CalcAimRay(), CalcAimRayAverage(), CreateAimRay(), and K3dAim().
float K3dAim::m_fAverage [private] |
Average between near plane (width, height) and far plane (width, height).
Definition at line 46 of file K3dAim.h.
Referenced by CalcAimRay(), CalcAimRayAverage(), and GetAverage().
float K3dAim::m_fFarDist [private] |
Far plane distance.
Definition at line 48 of file K3dAim.h.
Referenced by CalcAimRay(), CalcAimRayAverage(), and GetFarDist().
K3dRayObj* K3dAim::m_pRay [private] |
K3dRayBuild* K3dAim::m_pRayBuild [private] |
Pointer to ray builder.
Definition at line 50 of file K3dAim.h.
Referenced by CreateAimRay(), and K3dAim().
1.5.0