#include <Scene.h>
Inheritance diagram for Engine::Scene:
Public Member Functions | |
Scene () | |
virtual | ~Scene () |
virtual void | take_input (InputReport &report)=0 |
Take input from an input device. | |
virtual void | update_logic (unsigned int milliseconds_elapsed)=0 |
Process any status changes that occur due to elapsed time. | |
virtual void | draw ()=0 |
Draw the scene using OpenGL commands. | |
virtual void | do_sound ()=0 |
Update the audio. | |
virtual void | attach_main_loop (MainLoop &main_loop) |
Attach a Main loop object. | |
Protected Attributes | |
MainLoop * | main_loop |
pointer to the main_loop to contact if we should end. |
It should update it self every frame depending on the time taken, and respond to user input. It will also get to draw things every frame.
Only one Scene may be active in a MainLoop at any one time.
Definition at line 28 of file Scene.h.
void Engine::Scene::attach_main_loop | ( | MainLoop & | main_loop | ) | [virtual] |
Attach a Main loop object.
If the scene wishes to end, it can notify the main loop obect by calling exit.
Reimplemented in UI::TitleScene.
virtual void Engine::Scene::do_sound | ( | ) | [pure virtual] |
Update the audio.
Implemented in Engine::GameScene, Engine::LoadScene< T, Q >, UI::CarSelectScene, UI::TitleScene, and Engine::LoadScene< Engine::GameScene, Engine::ReplayReader >.
virtual void Engine::Scene::draw | ( | ) | [pure virtual] |
Draw the scene using OpenGL commands.
Must go from any state to ready for a buffer swap.
Implemented in Engine::GameScene, Engine::LoadScene< T, Q >, UI::CarSelectScene, UI::TitleScene, and Engine::LoadScene< Engine::GameScene, Engine::ReplayReader >.
virtual void Engine::Scene::take_input | ( | InputReport & | report | ) | [pure virtual] |
Take input from an input device.
report | An input report, which may be freed immediately after the call returns. |
Implemented in Engine::GameScene, Engine::LoadScene< T, Q >, UI::CarSelectScene, UI::TitleScene, and Engine::LoadScene< Engine::GameScene, Engine::ReplayReader >.
virtual void Engine::Scene::update_logic | ( | unsigned int | milliseconds_elapsed | ) | [pure virtual] |
Process any status changes that occur due to elapsed time.
milliseconds_elapsed | time in milliseconds since last update_logic. |
Implemented in Engine::GameScene, Engine::LoadScene< T, Q >, UI::CarSelectScene, UI::TitleScene, and Engine::LoadScene< Engine::GameScene, Engine::ReplayReader >.
MainLoop* Engine::Scene::main_loop [protected] |
Generated at Mon Sep 6 00:41:17 2010 by Doxygen version 1.4.7 for Racer version svn335.