Representation of an entire scene graph. More...
#include <Scene.hh>
Public Types | |
| enum | SceneType { BSP, GENERIC } |
Public Member Functions | |
| Scene (const std::string &_name, bool _enableVisualizations=false) | |
| Constructor. | |
| virtual | ~Scene () |
| Destructor. | |
| void | Load (sdf::ElementPtr &_scene) |
| Load the scene from a set of parameters. | |
| void | Load () |
| Load the scene with default parameters. | |
| void | Init () |
| Init. | |
| void | PreRender () |
| Process all received messages. | |
| Ogre::SceneManager * | GetManager () const |
| Get the OGRE scene manager. | |
| std::string | GetName () const |
| Get the name of the scene. | |
| void | SetAmbientColor (const common::Color &color) |
| Set the ambient color. | |
| common::Color | GetAmbientColor () const |
| Get the ambient color. | |
| void | SetBackgroundColor (const common::Color &color) |
| Set the background color. | |
| common::Color | GetBackgroundColor () const |
| Get the background color. | |
| void | CreateGrid (uint32_t cell_count, float cell_length, float line_width, const common::Color &color) |
| Create a grid. | |
| Grid * | GetGrid (unsigned int index) const |
| Get the grid. | |
| CameraPtr | CreateCamera (const std::string &name, bool _autoRender=true) |
| Create a camera. | |
| DepthCameraPtr | CreateDepthCamera (const std::string &_name, bool _autoRender=true) |
| Create depth camera. | |
| unsigned int | GetCameraCount () const |
| Get the number of cameras in this scene. | |
| CameraPtr | GetCamera (unsigned int index) const |
| Get a camera. | |
| CameraPtr | GetCamera (const std::string &_name) const |
| Get a camera by name. | |
| UserCameraPtr | CreateUserCamera (const std::string &name) |
| Create a user camera. | |
| unsigned int | GetUserCameraCount () const |
| Get the number of user cameras in this scene. | |
| UserCameraPtr | GetUserCamera (unsigned int index) const |
| Get a user camera. | |
| VisualPtr | GetVisual (const std::string &_name) const |
| Get a visual by name. | |
| VisualPtr | SelectVisualAt (CameraPtr camera, math::Vector2i mousePos) |
| void | SelectVisual (const std::string &_name) const |
| Select a visual by name. | |
| VisualPtr | GetVisualAt (CameraPtr camera, math::Vector2i mousePos, std::string &mod) |
| Get an entity at a pixel location using a camera. | |
| VisualPtr | GetVisualAt (CameraPtr camera, math::Vector2i mousePos) |
| Get a visual at a mouse position. | |
| VisualPtr | GetVisualBelowPoint (const math::Vector3 &_pt) |
| Get a visual directly below a point. | |
| math::Vector3 | GetFirstContact (CameraPtr camera, math::Vector2i mousePos) |
| Get the world pos of a the first contact at a pixel location. | |
| void | PrintSceneGraph () |
| void | SetVisible (const std::string &name, bool visible) |
| Hide a visual. | |
| void | DrawLine (const math::Vector3 &start, const math::Vector3 &end, const std::string &name) |
| Draw a named line. | |
| void | SetFog (const std::string &_type, const common::Color &_color, double _density, double _start, double _end) |
| unsigned int | GetId () const |
| std::string | GetIdString () const |
| std::string | GetUniqueName (const std::string &_prefix) |
| Get a unique scene node node. | |
| SelectionObj * | GetSelectionObj () const |
| Get the selection object. | |
| void | InitShadows () |
| Deprecated: use RTShader::ApplyShadows. | |
| void | SetSky (const std::string &_material) |
| void | SetShadowsEnabled (bool _value) |
| Set whether shadows are on or off. | |
| bool | GetShadowsEnabled () const |
| Get whether shadows are on or off. | |
| void | AddVisual (VisualPtr &_vis) |
| Add a visual to the scene. | |
| void | RemoveVisual (VisualPtr _vis) |
| Remove a visual from the scene. | |
| void | SetGrid (bool _enabled) |
| Set the grid on or off. | |
| VisualPtr | GetWorldVisual () const |
| void | Clear () |
Representation of an entire scene graph.
| VisualPtr GetVisualAt | ( | CameraPtr | camera, |
| math::Vector2i | mousePos, | ||
| std::string & | mod | ||
| ) |
Get an entity at a pixel location using a camera.
Used for mouse picking.
| camera | The ogre camera, used to do mouse picking |
| mousePos | The position of the mouse in screen coordinates |
| _mod | Used for object manipulation |
| void SetGrid | ( | bool | _enabled | ) |
Set the grid on or off.
| _enabled | Set to true to turn on the grid |
| void SetShadowsEnabled | ( | bool | _value | ) |
Set whether shadows are on or off.
| _value | True to enable shadows, False to disable |
1.7.5.1