K3dScene Class Reference

#include <K3dScene.h>

Inheritance diagram for K3dScene:

K3dTimer K3dKeyMap K3dMouse K3dLua K3dMngSystem K3dOptions K3dKeyboard K3dOpenGL K3dStream K3dIntersection K3dMngGraphics K3dMngGeometry K3dMngControl K3dKeyMapBuild K3dTools K3dAim K3dDraw K3dLight K3dObjectBuild K3dMngGui K2dImageWork K2dImageBuild K3dFontBmp K3dTextureBuild K3dIntrLinSph K3dString List of all members.

Public Member Functions

 K3dScene (K3dGameData *_pGameData, int _argc, char *_argv[])
 ~K3dScene ()
void SetScenePaths ()
 First argument is application path. Get first application argument and set default paths.
void CheckArguments ()
 Checkt input arguments from application.
void Init ()
 Init scene.
void LoadNewScript (const char *_strFilename)
 Delete current script and load new script.
void Load (K3dString &_strFilename)
 Load scene.
void Delete ()
 Delete scene.
void Update ()
 Update scene.
void Draw ()
 Draw scene.
bool & GetExit ()

Private Attributes

K3dGameDatam_pGameData
 Global game data, data centered game system.
char * m_pArgumentArray []
 Array of scene arguments.
int m_iNumArguments
 Number of afguments.
bool m_bIsExit
 Exit engine ?
K3dMatrixm_pViewMatrix
 OpenGL View matrix.

Detailed Description

Definition at line 45 of file K3dScene.h.


Constructor & Destructor Documentation

K3dScene::K3dScene ( K3dGameData _pGameData,
int  _argc,
char *  _argv[] 
)

Definition at line 37 of file K3dScene.cpp.

References CheckArguments(), K3dGameData::GetMatrixSP(), K3dConfDataBuild::LoadConf(), K3dOptions::LoadOptions(), m_bIsExit, m_iNumArguments, m_pArgumentArray, m_pGameData, m_pViewMatrix, K3dSafePointer< _T >::New(), K3dSceneData::SetScene(), and K3dSceneData::SetViewMatrix().

K3dScene::~K3dScene (  ) 

Definition at line 65 of file K3dScene.cpp.

References K3dSafePointer< _T >::Delete(), K3dGameData::GetMatrixSP(), m_pGameData, and m_pViewMatrix.


Member Function Documentation

void K3dScene::SetScenePaths (  ) 

First argument is application path. Get first application argument and set default paths.

Definition at line 71 of file K3dScene.cpp.

References K3dString::GetString(), K3dSystemData::GetSysHome(), K3D_STR_SHARE_PATH, K_PATH_APP, K_PATH_MAP, K_PATH_SCRIPT, K_STR_MAPS_PATH, K_STR_SCRIPT_PATH, m_pGameData, and K3dSceneData::SetPath().

Referenced by CheckArguments().

void K3dScene::CheckArguments (  ) 

Checkt input arguments from application.

Definition at line 96 of file K3dScene.cpp.

References SetScenePaths().

Referenced by K3dScene().

void K3dScene::Init (  ) 

Init scene.

Definition at line 139 of file K3dScene.cpp.

References K3dMngSystem::InitMngSystem().

Referenced by Load().

void K3dScene::LoadNewScript ( const char *  _strFilename  ) 

Delete current script and load new script.

Parameters:
_strFilename Script file name

Definition at line 106 of file K3dScene.cpp.

References Delete(), K3dVM::Engine_Init(), K3dVM::GetLua(), K3dSceneData::GetPath(), K3dString::GetString(), K3dSceneData::GetVM(), K_PATH_APP, K3dLua::LuaLoadFile(), m_pGameData, and K3dVM::RegisterFunctions().

Referenced by K3dMenu::LoadMapFromListBox(), and K3dVM::LoadNewScript().

void K3dScene::Load ( K3dString _strFilename  ) 

Load scene.

Parameters:
_strFilename Filename string

Definition at line 126 of file K3dScene.cpp.

References K3dSceneData::GetMapFileName(), K3dSceneData::GetPath(), K3dString::GetString(), Init(), K3dSceneData::InitPath(), K_PATH_APP, and m_pGameData.

Referenced by K3dVM::LoadMap().

void K3dScene::Delete (  ) 

Delete scene.

Definition at line 146 of file K3dScene.cpp.

References K3dMngSystem::DeleteMngSystem(), K3dSafePointer< _T >::Get(), K3dTexture::GetId(), K3dSafePointer< _T >::GetNum(), K3dGameData::GetTextureObjSP(), and m_pGameData.

Referenced by K3dEngine::Destroy(), and LoadNewScript().

void K3dScene::Update (  ) 

Update scene.

Definition at line 163 of file K3dScene.cpp.

References K3dTimer::CalculateFPS(), K3dSceneData::GetMouse(), K3dSceneData::GetTimer(), m_pGameData, K3dKeyboard::UpdateKeyboard(), K3dMngSystem::UpdateMngSystem(), and K3dMouse::UpdateMouse().

Referenced by K3dEngine::Start().

void K3dScene::Draw (  ) 

Draw scene.

Definition at line 174 of file K3dScene.cpp.

References K3dMngSystem::DrawMngSystem().

Referenced by K3dEngine::Start().

bool& K3dScene::GetExit (  )  [inline]

Definition at line 70 of file K3dScene.h.

References m_bIsExit.

Referenced by K3dVM::Exit(), and K3dEngine::ProcessEvent().


Member Data Documentation

K3dGameData* K3dScene::m_pGameData [private]

Global game data, data centered game system.

Reimplemented from K3dKeyMap.

Definition at line 53 of file K3dScene.h.

Referenced by Delete(), K3dScene(), Load(), LoadNewScript(), SetScenePaths(), Update(), and ~K3dScene().

char* K3dScene::m_pArgumentArray[] [private]

Array of scene arguments.

Definition at line 54 of file K3dScene.h.

Referenced by K3dScene().

int K3dScene::m_iNumArguments [private]

Number of afguments.

Definition at line 55 of file K3dScene.h.

Referenced by K3dScene().

bool K3dScene::m_bIsExit [private]

Exit engine ?

Definition at line 56 of file K3dScene.h.

Referenced by GetExit(), and K3dScene().

K3dMatrix* K3dScene::m_pViewMatrix [private]

OpenGL View matrix.

Definition at line 57 of file K3dScene.h.

Referenced by K3dScene(), and ~K3dScene().


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