K3dAim Class Reference

#include <K3dAim.h>

Inheritance diagram for K3dAim:

K3dMngGeometry K3dMngSystem K3dScene List of all members.

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

K3dGameDatam_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.
K3dRayObjm_pRay
 Aiming ray.
K3dRayBuildm_pRayBuild
 Pointer to ray builder.

Detailed Description

Definition at line 43 of file K3dAim.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Return values:
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]

Get or set far plane distance.

Definition at line 69 of file K3dAim.h.

References m_fFarDist.


Member Data Documentation

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]

Aiming ray.

Definition at line 49 of file K3dAim.h.

Referenced by CalcAimRay(), and CreateAimRay().

K3dRayBuild* K3dAim::m_pRayBuild [private]

Pointer to ray builder.

Definition at line 50 of file K3dAim.h.

Referenced by CreateAimRay(), and K3dAim().


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