Representation of an entire scene graph. More...
#include <rendering/rendering.hh>
Public Types | |
enum | SkyXMode { GZ_SKYX_ALL = 0x0FFFFFFF, GZ_SKYX_CLOUDS = 0x0000001, GZ_SKYX_MOON = 0x0000002, GZ_SKYX_NONE = 0 } |
Public Member Functions | |
Scene (const std::string &_name, const bool _enableVisualizations=false, const bool _isServer=false) | |
Constructor. More... | |
virtual | ~Scene () |
Destructor. More... | |
void | AddLight (LightPtr _light) |
Add a light to the scene. More... | |
void | AddVisual (VisualPtr _vis) |
Add a visual to the scene. More... | |
common::Color | AmbientColor () const |
Get the ambient color. More... | |
common::Color | BackgroundColor () const |
Get the background color. More... | |
uint32_t | CameraCount () const |
Get the number of cameras in this scene. More... | |
void | Clear () |
Clear rendering::Scene. More... | |
CameraPtr | CreateCamera (const std::string &_name, const bool _autoRender=true) |
Create a camera. More... | |
DepthCameraPtr | CreateDepthCamera (const std::string &_name, const bool _autoRender=true) |
Create depth camera. More... | |
GpuLaserPtr | CreateGpuLaser (const std::string &_name, const bool _autoRender=true) |
Create laser that generates data from rendering. More... | |
void | CreateGrid (const uint32_t _cellCount, const float _cellLength, const float _lineWidth, const common::Color &_color) |
Create a square grid of cells. More... | |
OculusCameraPtr | CreateOculusCamera (const std::string &_name) |
Create an oculus rift camera. More... | |
UserCameraPtr | CreateUserCamera (const std::string &_name, const bool _stereoEnabled=false) |
Create a user camera. More... | |
WideAngleCameraPtr | CreateWideAngleCamera (const std::string &_name, const bool _autoRender=true) |
Create a wide-angle camera. More... | |
void | DrawLine (const math::Vector3 &_start, const math::Vector3 &_end, const std::string &_name) GAZEBO_DEPRECATED(7.0) |
Draw a named line. More... | |
void | DrawLine (const ignition::math::Vector3d &_start, const ignition::math::Vector3d &_end, const std::string &_name) |
Draw a named line. More... | |
bool | FirstContact (CameraPtr _camera, const ignition::math::Vector2i &_mousePos, ignition::math::Vector3d &_position) |
Get the world pos of a the first contact at a pixel location. More... | |
common::Color | GetAmbientColor () const GAZEBO_DEPRECATED(7.0) |
Get the ambient color. More... | |
common::Color | GetBackgroundColor () const GAZEBO_DEPRECATED(7.0) |
Get the background color. More... | |
CameraPtr | GetCamera (const uint32_t _index) const |
Get a camera based on an index. More... | |
CameraPtr | GetCamera (const std::string &_name) const |
Get a camera by name. More... | |
uint32_t | GetCameraCount () const GAZEBO_DEPRECATED(7.0) |
Get the number of cameras in this scene. More... | |
bool | GetFirstContact (CameraPtr _camera, const math::Vector2i &_mousePos, math::Vector3 &_position) GAZEBO_DEPRECATED(7.0) |
Get the world pos of a the first contact at a pixel location. More... | |
Grid * | GetGrid (uint32_t _index) const |
Get a grid based on an index. More... | |
uint32_t | GetGridCount () const GAZEBO_DEPRECATED(7.0) |
Get the number of grids. More... | |
double | GetHeightBelowPoint (const math::Vector3 &_pt) GAZEBO_DEPRECATED(7.0) |
Get the Z-value of the first object below the given point. More... | |
Heightmap * | GetHeightmap () const |
Get a pointer to the heightmap. More... | |
uint32_t | GetId () const GAZEBO_DEPRECATED(7.0) |
Get the scene ID. More... | |
std::string | GetIdString () const GAZEBO_DEPRECATED(7.0) |
Get the scene Id as a string. More... | |
bool | GetInitialized () const GAZEBO_DEPRECATED(7.0) |
Return true if the Scene has been initialized. More... | |
LightPtr | GetLight (const std::string &_name) const |
Get a light by name. More... | |
LightPtr | GetLight (const uint32_t _index) const |
Get a light based on an index. More... | |
uint32_t | GetLightCount () const GAZEBO_DEPRECATED(7.0) |
Get the count of the lights. More... | |
Ogre::SceneManager * | GetManager () const GAZEBO_DEPRECATED(7.0) |
Get the OGRE scene manager. More... | |
VisualPtr | GetModelVisualAt (CameraPtr _camera, const math::Vector2i &_mousePos) GAZEBO_DEPRECATED(7.0) |
Get a model's visual at a mouse position. More... | |
std::string | GetName () const GAZEBO_DEPRECATED(7.0) |
Get the name of the scene. More... | |
uint32_t | GetOculusCameraCount () const GAZEBO_DEPRECATED(7.0) |
Get the number of cameras in this scene. More... | |
VisualPtr | GetSelectedVisual () const GAZEBO_DEPRECATED(7.0) |
Get the currently selected visual. More... | |
bool | GetShadowsEnabled () const GAZEBO_DEPRECATED(7.0) |
Get whether shadows are on or off. More... | |
bool | GetShowClouds () const GAZEBO_DEPRECATED(7.0) |
Get whether or not clouds are displayed. More... | |
common::Time | GetSimTime () const GAZEBO_DEPRECATED(7.0) |
Get the scene simulation time. More... | |
SkyX::SkyX * | GetSkyX () const |
Get the sky in the scene. More... | |
UserCameraPtr | GetUserCamera (const uint32_t _index) const |
Get a user camera by index. More... | |
uint32_t | GetUserCameraCount () const GAZEBO_DEPRECATED(7.0) |
Get the number of user cameras in this scene. More... | |
VisualPtr | GetVisual (const std::string &_name) const |
Get a visual by name. More... | |
VisualPtr | GetVisual (const uint32_t _id) const |
Get a visual by id. More... | |
VisualPtr | GetVisualAt (CameraPtr _camera, const math::Vector2i &_mousePos, std::string &_mod) GAZEBO_DEPRECATED(7.0) |
Get an entity at a pixel location using a camera. More... | |
VisualPtr | GetVisualAt (CameraPtr _camera, const math::Vector2i &_mousePos) GAZEBO_DEPRECATED(7.0) |
Get a visual at a mouse position. More... | |
VisualPtr | GetVisualBelow (const std::string &_visualName) GAZEBO_DEPRECATED(7.0) |
Get the closest visual below a given visual. More... | |
uint32_t | GetVisualCount () const GAZEBO_DEPRECATED(7.0) |
Get the number of visuals. More... | |
void | GetVisualsBelowPoint (const math::Vector3 &_pt, std::vector< VisualPtr > &_visuals) GAZEBO_DEPRECATED(7.0) |
Get a visual directly below a point. More... | |
VisualPtr | GetWorldVisual () const GAZEBO_DEPRECATED(7.0) |
Get the top level world visual. More... | |
uint32_t | GridCount () const |
Get the number of grids. More... | |
double | HeightBelowPoint (const ignition::math::Vector3d &_pt) |
Get the Z-value of the first object below the given point. More... | |
uint32_t | Id () const |
Get the scene ID. More... | |
std::string | IdString () const |
Get the scene Id as a string. More... | |
void | Init () |
Init rendering::Scene. More... | |
bool | Initialized () const |
Return true if the Scene has been initialized. More... | |
uint32_t | LightCount () const |
Get the count of the lights. More... | |
void | Load (sdf::ElementPtr _scene) |
Load the scene from a set of parameters. More... | |
void | Load () |
Load the scene with default parameters. More... | |
VisualPtr | ModelVisualAt (CameraPtr _camera, const ignition::math::Vector2i &_mousePos) |
Get a model's visual at a mouse position. More... | |
std::string | Name () const |
Get the name of the scene. More... | |
uint32_t | OculusCameraCount () const |
Get the number of cameras in this scene. More... | |
Ogre::SceneManager * | OgreSceneManager () const |
Get the OGRE scene manager. More... | |
void | PreRender () |
Process all received messages. More... | |
void | PrintSceneGraph () |
Print the scene graph to std_out. More... | |
void | RemoveCamera (const std::string &_name) |
Remove a camera from the scene. More... | |
void | RemoveLight (LightPtr _light) |
Remove a light to the scene. More... | |
void | RemoveProjectors () |
Remove all projectors. More... | |
void | RemoveVisual (VisualPtr _vis) |
Remove a visual from the scene. More... | |
void | RemoveVisual (const uint32_t _id) |
Remove a visual from the scene. More... | |
VisualPtr | SelectedVisual () const |
Get the currently selected visual. More... | |
void | SelectVisual (const std::string &_name, const std::string &_mode) |
Select a visual by name. More... | |
void | SetAmbientColor (const common::Color &_color) |
Set the ambient color. More... | |
void | SetBackgroundColor (const common::Color &_color) |
Set the background color. More... | |
void | SetFog (const std::string &_type, const common::Color &_color, const double _density, const double _start, const double _end) |
Set the fog parameters. More... | |
void | SetGrid (const bool _enabled) |
Set the grid on or off. More... | |
void | SetShadowsEnabled (const bool _value) |
Set whether shadows are on or off. More... | |
void | SetSkyXMode (const unsigned int _mode) |
Set SkyX mode to enable/disable skyx components such as clouds and moon. More... | |
void | SetTransparent (const bool _show) |
Enable or disable transparency for all visuals. More... | |
void | SetVisible (const std::string &_name, const bool _visible) |
Hide or show a visual. More... | |
void | SetVisualId (VisualPtr _vis, const uint32_t _id) |
void | SetWireframe (const bool _show) |
Enable or disable wireframe for all visuals. More... | |
bool | ShadowsEnabled () const |
Get whether shadows are on or off. More... | |
void | ShowClouds (const bool _show) |
Display clouds in the sky. More... | |
bool | ShowClouds () const |
Get whether or not clouds are displayed. More... | |
void | ShowCollisions (const bool _show) |
Enable or disable collision visualization. More... | |
void | ShowCOMs (const bool _show) |
Enable or disable center of mass visualization. More... | |
void | ShowContacts (const bool _show) |
Enable or disable contact visualization. More... | |
void | ShowInertias (const bool _show) |
Enable or disable inertia visualization. More... | |
void | ShowJoints (const bool _show) |
Enable or disable joint visualization. More... | |
void | ShowLinkFrames (const bool _show) |
Enable or disable link frame visualization. More... | |
void | ShowOrigin (const bool _show) |
Show/hide the world origin indicator. More... | |
common::Time | SimTime () const |
Get the scene simulation time. More... | |
void | SnapVisualToNearestBelow (const std::string &_visualName) |
Move the visual to be ontop of the nearest visual below it. More... | |
std::string | StripSceneName (const std::string &_name) const |
Remove the name of scene from a string. More... | |
void | ToggleLayer (const int32_t _layer) |
Toggle layer visilibility. More... | |
uint32_t | UserCameraCount () const |
Get the number of user cameras in this scene. More... | |
VisualPtr | VisualAt (CameraPtr _camera, const ignition::math::Vector2i &_mousePos, std::string &_mod) |
Get an entity at a pixel location using a camera. More... | |
VisualPtr | VisualAt (CameraPtr _camera, const ignition::math::Vector2i &_mousePos) |
Get a visual at a mouse position. More... | |
VisualPtr | VisualBelow (const std::string &_visualName) |
Get the closest visual below a given visual. More... | |
uint32_t | VisualCount () const |
Get the number of visuals. More... | |
void | VisualsBelowPoint (const ignition::math::Vector3d &_pt, std::vector< VisualPtr > &_visuals) |
Get a visual directly below a point. More... | |
VisualPtr | WorldVisual () const |
Get the top level world visual. More... | |
Representation of an entire scene graph.
Maintains all the Visuals, Lights, and Cameras for a World.
gazebo::rendering::Scene::Scene | ( | const std::string & | _name, |
const bool | _enableVisualizations = false , |
||
const bool | _isServer = false |
||
) |
Constructor.
[in] | _name | Name of the scene. |
[in] | _enableVisualizations | True to enable visualizations, this should be set to true for user interfaces, and false for sensor generation. |
|
virtual |
Destructor.
void gazebo::rendering::Scene::AddLight | ( | LightPtr | _light | ) |
Add a light to the scene.
[in] | _light | Light to add. |
void gazebo::rendering::Scene::AddVisual | ( | VisualPtr | _vis | ) |
Add a visual to the scene.
[in] | _vis | Visual to add. |
common::Color gazebo::rendering::Scene::AmbientColor | ( | ) | const |
Get the ambient color.
common::Color gazebo::rendering::Scene::BackgroundColor | ( | ) | const |
Get the background color.
uint32_t gazebo::rendering::Scene::CameraCount | ( | ) | const |
Get the number of cameras in this scene.
void gazebo::rendering::Scene::Clear | ( | ) |
Clear rendering::Scene.
CameraPtr gazebo::rendering::Scene::CreateCamera | ( | const std::string & | _name, |
const bool | _autoRender = true |
||
) |
Create a camera.
[in] | _name | Name of the new camera. |
[in] | _autoRender | True to allow Gazebo to automatically render the camera. This should almost always be true. |
DepthCameraPtr gazebo::rendering::Scene::CreateDepthCamera | ( | const std::string & | _name, |
const bool | _autoRender = true |
||
) |
Create depth camera.
[in] | _name | Name of the new camera. |
[in] | _autoRender | True to allow Gazebo to automatically render the camera. This should almost always be true. |
GpuLaserPtr gazebo::rendering::Scene::CreateGpuLaser | ( | const std::string & | _name, |
const bool | _autoRender = true |
||
) |
Create laser that generates data from rendering.
[in] | _name | Name of the new laser. |
[in] | _autoRender | True to allow Gazebo to automatically render the camera. This should almost always be true. |
void gazebo::rendering::Scene::CreateGrid | ( | const uint32_t | _cellCount, |
const float | _cellLength, | ||
const float | _lineWidth, | ||
const common::Color & | _color | ||
) |
Create a square grid of cells.
[in] | _cellCount | Number of grid cells in one direction. |
[in] | _cellLength | Length of one grid cell. |
[in] | _lineWidth | Width of the grid lines. |
[in] | _color | Color of the grid lines. |
OculusCameraPtr gazebo::rendering::Scene::CreateOculusCamera | ( | const std::string & | _name | ) |
Create an oculus rift camera.
[in] | _name | Name of the new camera. |
UserCameraPtr gazebo::rendering::Scene::CreateUserCamera | ( | const std::string & | _name, |
const bool | _stereoEnabled = false |
||
) |
Create a user camera.
A user camera is one design for use with a GUI.
[in] | _name | Name of the UserCamera. |
[in] | _stereoEnabled | True to enable stereo rendering. This is here for compatibility with 3D monitors/TVs. |
WideAngleCameraPtr gazebo::rendering::Scene::CreateWideAngleCamera | ( | const std::string & | _name, |
const bool | _autoRender = true |
||
) |
Create a wide-angle camera.
[in] | _name | Name of the new camera. |
[in] | _autoRender | True to allow Gazebo to automatically render the camera. This should almost always be true. |
void gazebo::rendering::Scene::DrawLine | ( | const math::Vector3 & | _start, |
const math::Vector3 & | _end, | ||
const std::string & | _name | ||
) |
Draw a named line.
[in] | _start | Start position of the line. |
[in] | _end | End position of the line. |
[in] | _name | Name of the line. |
void gazebo::rendering::Scene::DrawLine | ( | const ignition::math::Vector3d & | _start, |
const ignition::math::Vector3d & | _end, | ||
const std::string & | _name | ||
) |
Draw a named line.
[in] | _start | Start position of the line. |
[in] | _end | End position of the line. |
[in] | _name | Name of the line. |
bool gazebo::rendering::Scene::FirstContact | ( | CameraPtr | _camera, |
const ignition::math::Vector2i & | _mousePos, | ||
ignition::math::Vector3d & | _position | ||
) |
Get the world pos of a the first contact at a pixel location.
[in] | _camera | Pointer to the camera. |
[in] | _mousePos | 2D position of the mouse in pixels. |
[out] | _position | 3D position of the first contact point. |
common::Color gazebo::rendering::Scene::GetAmbientColor | ( | ) | const |
common::Color gazebo::rendering::Scene::GetBackgroundColor | ( | ) | const |
CameraPtr gazebo::rendering::Scene::GetCamera | ( | const uint32_t | _index | ) | const |
Get a camera based on an index.
Index must be between 0 and Scene::GetCameraCount.
[in] | _index | Index of the camera to get. |
CameraPtr gazebo::rendering::Scene::GetCamera | ( | const std::string & | _name | ) | const |
Get a camera by name.
[in] | _name | Name of the camera. |
uint32_t gazebo::rendering::Scene::GetCameraCount | ( | ) | const |
bool gazebo::rendering::Scene::GetFirstContact | ( | CameraPtr | _camera, |
const math::Vector2i & | _mousePos, | ||
math::Vector3 & | _position | ||
) |
Get the world pos of a the first contact at a pixel location.
[in] | _camera | Pointer to the camera. |
[in] | _mousePos | 2D position of the mouse in pixels. |
[out] | _position | 3D position of the first contact point. |
Grid* gazebo::rendering::Scene::GetGrid | ( | uint32_t | _index | ) | const |
Get a grid based on an index.
Index must be between 0 and Scene::GetGridCount.
[in] | _index | Index of the grid. |
uint32_t gazebo::rendering::Scene::GetGridCount | ( | ) | const |
double gazebo::rendering::Scene::GetHeightBelowPoint | ( | const math::Vector3 & | _pt | ) |
Get the Z-value of the first object below the given point.
[in] | _pt | Position to search below for a visual. |
Heightmap* gazebo::rendering::Scene::GetHeightmap | ( | ) | const |
Get a pointer to the heightmap.
uint32_t gazebo::rendering::Scene::GetId | ( | ) | const |
std::string gazebo::rendering::Scene::GetIdString | ( | ) | const |
bool gazebo::rendering::Scene::GetInitialized | ( | ) | const |
Return true if the Scene has been initialized.
LightPtr gazebo::rendering::Scene::GetLight | ( | const std::string & | _name | ) | const |
Get a light by name.
[in] | _name | Name of the light to get. |
LightPtr gazebo::rendering::Scene::GetLight | ( | const uint32_t | _index | ) | const |
Get a light based on an index.
The index must be between 0 and Scene::GetLightCount.
[in] | _index | Index of the light. |
uint32_t gazebo::rendering::Scene::GetLightCount | ( | ) | const |
Ogre::SceneManager* gazebo::rendering::Scene::GetManager | ( | ) | const |
Get the OGRE scene manager.
VisualPtr gazebo::rendering::Scene::GetModelVisualAt | ( | CameraPtr | _camera, |
const math::Vector2i & | _mousePos | ||
) |
Get a model's visual at a mouse position.
[in] | _camera | Pointer to the camera used to project the mouse position. |
[in] | _mousePos | The 2d position of the mouse in pixels. |
std::string gazebo::rendering::Scene::GetName | ( | ) | const |
uint32_t gazebo::rendering::Scene::GetOculusCameraCount | ( | ) | const |
Get the number of cameras in this scene.
VisualPtr gazebo::rendering::Scene::GetSelectedVisual | ( | ) | const |
Get the currently selected visual.
bool gazebo::rendering::Scene::GetShadowsEnabled | ( | ) | const |
Get whether shadows are on or off.
bool gazebo::rendering::Scene::GetShowClouds | ( | ) | const |
Get whether or not clouds are displayed.
common::Time gazebo::rendering::Scene::GetSimTime | ( | ) | const |
SkyX::SkyX* gazebo::rendering::Scene::GetSkyX | ( | ) | const |
Get the sky in the scene.
UserCameraPtr gazebo::rendering::Scene::GetUserCamera | ( | const uint32_t | _index | ) | const |
Get a user camera by index.
The index value must be between 0 and Scene::GetUserCameraCount.
[in] | _index | Index of the UserCamera to get. |
uint32_t gazebo::rendering::Scene::GetUserCameraCount | ( | ) | const |
Get the number of user cameras in this scene.
VisualPtr gazebo::rendering::Scene::GetVisual | ( | const std::string & | _name | ) | const |
Get a visual by name.
[in] | _name | Name of the visual to retrieve. |
VisualPtr gazebo::rendering::Scene::GetVisual | ( | const uint32_t | _id | ) | const |
Get a visual by id.
[in] | _id | ID of the visual to retrieve. |
VisualPtr gazebo::rendering::Scene::GetVisualAt | ( | CameraPtr | _camera, |
const math::Vector2i & | _mousePos, | ||
std::string & | _mod | ||
) |
Get an entity at a pixel location using a camera.
Used for mouse picking.
[in] | _camera | The ogre camera, used to do mouse picking |
[in] | _mousePos | The position of the mouse in screen coordinates |
[out] | _mod | Used for object manipulation |
VisualPtr gazebo::rendering::Scene::GetVisualAt | ( | CameraPtr | _camera, |
const math::Vector2i & | _mousePos | ||
) |
Get a visual at a mouse position.
[in] | _camera | Pointer to the camera used to project the mouse position. |
[in] | _mousePos | The 2d position of the mouse in pixels. |
VisualPtr gazebo::rendering::Scene::GetVisualBelow | ( | const std::string & | _visualName | ) |
Get the closest visual below a given visual.
[in] | _visualName | Name of the visual to search below. |
uint32_t gazebo::rendering::Scene::GetVisualCount | ( | ) | const |
void gazebo::rendering::Scene::GetVisualsBelowPoint | ( | const math::Vector3 & | _pt, |
std::vector< VisualPtr > & | _visuals | ||
) |
Get a visual directly below a point.
[in] | _pt | 3D point to get the visual below. |
[out] | _visuals | The visuals below the point order in proximity. |
VisualPtr gazebo::rendering::Scene::GetWorldVisual | ( | ) | const |
uint32_t gazebo::rendering::Scene::GridCount | ( | ) | const |
Get the number of grids.
double gazebo::rendering::Scene::HeightBelowPoint | ( | const ignition::math::Vector3d & | _pt | ) |
Get the Z-value of the first object below the given point.
[in] | _pt | Position to search below for a visual. |
uint32_t gazebo::rendering::Scene::Id | ( | ) | const |
Get the scene ID.
std::string gazebo::rendering::Scene::IdString | ( | ) | const |
Get the scene Id as a string.
void gazebo::rendering::Scene::Init | ( | ) |
Init rendering::Scene.
bool gazebo::rendering::Scene::Initialized | ( | ) | const |
Return true if the Scene has been initialized.
uint32_t gazebo::rendering::Scene::LightCount | ( | ) | const |
Get the count of the lights.
void gazebo::rendering::Scene::Load | ( | sdf::ElementPtr | _scene | ) |
Load the scene from a set of parameters.
[in] | _scene | SDF scene element to load. |
void gazebo::rendering::Scene::Load | ( | ) |
Load the scene with default parameters.
VisualPtr gazebo::rendering::Scene::ModelVisualAt | ( | CameraPtr | _camera, |
const ignition::math::Vector2i & | _mousePos | ||
) |
Get a model's visual at a mouse position.
[in] | _camera | Pointer to the camera used to project the mouse position. |
[in] | _mousePos | The 2d position of the mouse in pixels. |
std::string gazebo::rendering::Scene::Name | ( | ) | const |
Get the name of the scene.
uint32_t gazebo::rendering::Scene::OculusCameraCount | ( | ) | const |
Get the number of cameras in this scene.
Ogre::SceneManager* gazebo::rendering::Scene::OgreSceneManager | ( | ) | const |
Get the OGRE scene manager.
void gazebo::rendering::Scene::PreRender | ( | ) |
Process all received messages.
void gazebo::rendering::Scene::PrintSceneGraph | ( | ) |
Print the scene graph to std_out.
void gazebo::rendering::Scene::RemoveCamera | ( | const std::string & | _name | ) |
Remove a camera from the scene.
[in] | _name | Name of the camera. |
void gazebo::rendering::Scene::RemoveLight | ( | LightPtr | _light | ) |
Remove a light to the scene.
[in] | _light | Light to Remove. |
void gazebo::rendering::Scene::RemoveProjectors | ( | ) |
Remove all projectors.
void gazebo::rendering::Scene::RemoveVisual | ( | VisualPtr | _vis | ) |
Remove a visual from the scene.
[in] | _vis | Visual to remove. |
void gazebo::rendering::Scene::RemoveVisual | ( | const uint32_t | _id | ) |
Remove a visual from the scene.
[in] | _id | Id of the visual to remove. |
VisualPtr gazebo::rendering::Scene::SelectedVisual | ( | ) | const |
Get the currently selected visual.
void gazebo::rendering::Scene::SelectVisual | ( | const std::string & | _name, |
const std::string & | _mode | ||
) |
Select a visual by name.
[in] | _name | Name of the visual to select. |
[in] | _mode | Selection mode (normal, or move). |
void gazebo::rendering::Scene::SetAmbientColor | ( | const common::Color & | _color | ) |
Set the ambient color.
[in] | _color | The ambient color to use. |
void gazebo::rendering::Scene::SetBackgroundColor | ( | const common::Color & | _color | ) |
Set the background color.
[in] | _color | The background color. |
void gazebo::rendering::Scene::SetFog | ( | const std::string & | _type, |
const common::Color & | _color, | ||
const double | _density, | ||
const double | _start, | ||
const double | _end | ||
) |
Set the fog parameters.
[in] | _type | Type of fog: "linear", "exp", or "exp2". |
[in] | _color | Color of the fog. |
[in] | _density | Fog density. |
[in] | _start | Distance from camera to start the fog. |
[in] | _end | Distance from camera at which the fog is at max density. |
void gazebo::rendering::Scene::SetGrid | ( | const bool | _enabled | ) |
Set the grid on or off.
[in] | _enabled | Set to true to turn on the grid |
void gazebo::rendering::Scene::SetShadowsEnabled | ( | const bool | _value | ) |
Set whether shadows are on or off.
[in] | _value | True to enable shadows, False to disable |
void gazebo::rendering::Scene::SetSkyXMode | ( | const unsigned int | _mode | ) |
Set SkyX mode to enable/disable skyx components such as clouds and moon.
[in] | _mode | SkyX mode bitmask. |
void gazebo::rendering::Scene::SetTransparent | ( | const bool | _show | ) |
Enable or disable transparency for all visuals.
[in] | _show | True to enable transparency for all visuals. |
void gazebo::rendering::Scene::SetVisible | ( | const std::string & | _name, |
const bool | _visible | ||
) |
Hide or show a visual.
[in] | _name | Name of the visual to change. |
[in] | _visible | True to make visual visible, False to make it invisible. |
void gazebo::rendering::Scene::SetVisualId | ( | VisualPtr | _vis, |
const uint32_t | _id | ||
) |
void gazebo::rendering::Scene::SetWireframe | ( | const bool | _show | ) |
Enable or disable wireframe for all visuals.
[in] | _show | True to enable wireframe for all visuals. |
bool gazebo::rendering::Scene::ShadowsEnabled | ( | ) | const |
Get whether shadows are on or off.
void gazebo::rendering::Scene::ShowClouds | ( | const bool | _show | ) |
Display clouds in the sky.
[in] | _show | True to display clouds. |
bool gazebo::rendering::Scene::ShowClouds | ( | ) | const |
Get whether or not clouds are displayed.
void gazebo::rendering::Scene::ShowCollisions | ( | const bool | _show | ) |
Enable or disable collision visualization.
[in] | _show | True to enable collision visualization. |
void gazebo::rendering::Scene::ShowCOMs | ( | const bool | _show | ) |
Enable or disable center of mass visualization.
[in] | _show | True to enable center of mass visualization. |
void gazebo::rendering::Scene::ShowContacts | ( | const bool | _show | ) |
Enable or disable contact visualization.
[in] | _show | True to enable contact visualization. |
void gazebo::rendering::Scene::ShowInertias | ( | const bool | _show | ) |
Enable or disable inertia visualization.
[in] | _show | True to enable inertia visualization. |
void gazebo::rendering::Scene::ShowJoints | ( | const bool | _show | ) |
Enable or disable joint visualization.
[in] | _show | True to enable joint visualization. |
void gazebo::rendering::Scene::ShowLinkFrames | ( | const bool | _show | ) |
Enable or disable link frame visualization.
[in] | _show | True to enable link frame visualization. |
void gazebo::rendering::Scene::ShowOrigin | ( | const bool | _show | ) |
Show/hide the world origin indicator.
[in] | _show | True to show the origin. |
common::Time gazebo::rendering::Scene::SimTime | ( | ) | const |
void gazebo::rendering::Scene::SnapVisualToNearestBelow | ( | const std::string & | _visualName | ) |
Move the visual to be ontop of the nearest visual below it.
[in] | _visualName | Name of the visual to move. |
std::string gazebo::rendering::Scene::StripSceneName | ( | const std::string & | _name | ) | const |
Remove the name of scene from a string.
[in] | _name | Name to string the scene name from. |
void gazebo::rendering::Scene::ToggleLayer | ( | const int32_t | _layer | ) |
Toggle layer visilibility.
This will process all visuals. If a visual is on the specified layer its visiblity will be toggled. Visuals with a negative layer index are always visible.
[in] | _layer | Index of the layer to toggle. |
uint32_t gazebo::rendering::Scene::UserCameraCount | ( | ) | const |
Get the number of user cameras in this scene.
VisualPtr gazebo::rendering::Scene::VisualAt | ( | CameraPtr | _camera, |
const ignition::math::Vector2i & | _mousePos, | ||
std::string & | _mod | ||
) |
Get an entity at a pixel location using a camera.
Used for mouse picking.
[in] | _camera | The ogre camera, used to do mouse picking |
[in] | _mousePos | The position of the mouse in screen coordinates |
[out] | _mod | Used for object manipulation |
VisualPtr gazebo::rendering::Scene::VisualAt | ( | CameraPtr | _camera, |
const ignition::math::Vector2i & | _mousePos | ||
) |
Get a visual at a mouse position.
[in] | _camera | Pointer to the camera used to project the mouse position. |
[in] | _mousePos | The 2d position of the mouse in pixels. |
VisualPtr gazebo::rendering::Scene::VisualBelow | ( | const std::string & | _visualName | ) |
Get the closest visual below a given visual.
[in] | _visualName | Name of the visual to search below. |
uint32_t gazebo::rendering::Scene::VisualCount | ( | ) | const |
Get the number of visuals.
void gazebo::rendering::Scene::VisualsBelowPoint | ( | const ignition::math::Vector3d & | _pt, |
std::vector< VisualPtr > & | _visuals | ||
) |
Get a visual directly below a point.
[in] | _pt | 3D point to get the visual below. |
[out] | _visuals | The visuals below the point order in proximity. |
VisualPtr gazebo::rendering::Scene::WorldVisual | ( | ) | const |
Get the top level world visual.