UGDK
0.5.0
|
A 3D game scene, or screen. More...
#include <ugdk/action/3D/scene3d.h>
Public Member Functions | |
Scene3D (const btVector3 &gravity) | |
virtual | ~Scene3D () |
virtual void | OnPushed (int index) |
Method called when this scene is pushed to the Engine's Scene stack. More... | |
void | ShowFrameStats () |
bool | IsFrameStatsVisible () |
void | UpdateFrameStats () |
void | HideFrameStats () |
const std::shared_ptr< Element > & | AddElement (const std::string &name="") |
void | DestroyAndRemoveElement (const std::shared_ptr< Element > &element) |
const std::unique_ptr< Physics > & | physics () const |
Ogre::SceneManager * | manager () const |
Camera * | camera () const |
Public Member Functions inherited from ugdk::action::Scene | |
Scene () | |
virtual | ~Scene () |
virtual void | Focus () |
Method called when this Scene arrives on the top of the Scene stack. More... | |
virtual void | DeFocus () |
Method called when this Scene leaves the top of the Scene stack. More... | |
void | Finish () |
Finishes the scene. More... | |
void | StopsPreviousMusic (bool set) |
Whether this scene stops the previous music even if wont play any music. More... | |
void | Update (double delta_t) |
Logical update of the scene. More... | |
void | Render (graphic::Canvas &) const |
Renders the scene to the given canvas if the scene is visible. More... | |
void | set_render_function (const std::function< void(graphic::Canvas &canvas)> &render_function) |
const std::string & | identifier () const |
void | set_identifier (const std::string &new_identifier) |
bool | finished () const |
bool | active () const |
void | set_active (bool is_active) |
bool | visible () const |
void | set_visible (bool is_visible) |
MediaManager & | media_manager () |
const MediaManager & | media_manager () const |
system::EventHandler & | event_handler () |
const system::EventHandler & | event_handler () const |
audio::Music * | background_music () const |
void | set_background_music (audio::Music *music) |
Public Member Functions inherited from ugdk::system::TaskPlayer | |
TaskPlayer () | |
virtual | ~TaskPlayer () |
void | AddTask (const Task &task) |
Adds a task to the scene. More... | |
void | Update (double delta_t) |
Executes all tasks held. More... | |
Protected Attributes | |
Ogre::SceneManager * | scene_mgr_ |
Ogre::OverlaySystem * | overlay_system_ |
Camera * | camera_ |
int | z_order_ |
Ogre::Viewport * | viewport_ |
Ogre::Overlay * | fps_stats_ |
std::unique_ptr< Physics > | physics_ |
std::unordered_set < std::shared_ptr< Element > > | elements_ |
std::forward_list < std::shared_ptr< Element > > | to_be_removed_ |
Additional Inherited Members | |
Protected Member Functions inherited from ugdk::action::Scene | |
virtual void | End () |
Ends the scene activity. More... | |
A 3D game scene, or screen.
Represents a Ogre 3D scene, which contains a tree of nodes (entities) to render, the associated camera and viewport, and Physics manager object.
ugdk::action::mode3d::Scene3D::Scene3D | ( | const btVector3 & | gravity | ) |
|
virtual |
const std::shared_ptr<Element>& ugdk::action::mode3d::Scene3D::AddElement | ( | const std::string & | name = "" | ) |
Creates and returns a new Element in this scene.
|
inline |
void ugdk::action::mode3d::Scene3D::DestroyAndRemoveElement | ( | const std::shared_ptr< Element > & | element | ) |
Marks an element to be destroyed and removed from this scene at the end of the frame.
void ugdk::action::mode3d::Scene3D::HideFrameStats | ( | ) |
bool ugdk::action::mode3d::Scene3D::IsFrameStatsVisible | ( | ) |
|
inline |
|
virtual |
Method called when this scene is pushed to the Engine's Scene stack.
Reimplemented from ugdk::action::Scene.
|
inline |
void ugdk::action::mode3d::Scene3D::ShowFrameStats | ( | ) |
void ugdk::action::mode3d::Scene3D::UpdateFrameStats | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |