Public Member Functions | List of all members
sdf::v11::Scene Class Reference

#include <Scene.hh>

Public Member Functions

 Scene ()
 Default constructor. More...
 
ignition::math::Color Ambient () const
 Get the ambient color of the scene. More...
 
ignition::math::Color Background () const
 Get the background color of the scene. More...
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load. More...
 
bool Grid () const
 Get whether grid is enabled. More...
 
Errors Load (ElementPtr _sdf)
 Load the scene based on a element pointer. More...
 
bool OriginVisual () const
 Get whether origin visual is enabled. More...
 
void SetAmbient (const ignition::math::Color &_ambient)
 Set the ambient color of the scene. More...
 
void SetBackground (const ignition::math::Color &_background)
 Set the background color of the scene. More...
 
void SetGrid (const bool _enabled)
 Set whether the grid should be enabled. More...
 
void SetOriginVisual (const bool _enabled)
 Set whether the origin visual should be enabled. More...
 
void SetShadows (const bool _shadows)
 Set whether shadows should be enabled. More...
 
void SetSky (const Sky &_sky)
 Set sky. More...
 
bool Shadows () const
 Get whether shadows are enabled. More...
 
const sdf::Sky * Sky () const
 Get sky. More...
 

Constructor & Destructor Documentation

◆ Scene()

sdf::v11::Scene::Scene ( )

Default constructor.

Member Function Documentation

◆ Ambient()

ignition::math::Color sdf::v11::Scene::Ambient ( ) const

Get the ambient color of the scene.

Returns
Scene ambient color

◆ Background()

ignition::math::Color sdf::v11::Scene::Background ( ) const

Get the background color of the scene.

Returns
Scene background color

◆ Element()

sdf::ElementPtr sdf::v11::Scene::Element ( ) const

Get a pointer to the SDF element that was used during load.

Returns
SDF element pointer. The value will be nullptr if Load has not been called.

◆ Grid()

bool sdf::v11::Scene::Grid ( ) const

Get whether grid is enabled.

Returns
True if grid is enabled

◆ Load()

Errors sdf::v11::Scene::Load ( ElementPtr  _sdf)

Load the scene based on a element pointer.

This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.

Parameters
[in]_sdfThe SDF Element pointer
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ OriginVisual()

bool sdf::v11::Scene::OriginVisual ( ) const

Get whether origin visual is enabled.

Returns
True if origin visual is enabled

◆ SetAmbient()

void sdf::v11::Scene::SetAmbient ( const ignition::math::Color &  _ambient)

Set the ambient color of the scene.

Parameters
[in]_ambientAmbient color to set to

◆ SetBackground()

void sdf::v11::Scene::SetBackground ( const ignition::math::Color &  _background)

Set the background color of the scene.

Parameters
[in]_backgroundBackground color to set to

◆ SetGrid()

void sdf::v11::Scene::SetGrid ( const bool  _enabled)

Set whether the grid should be enabled.

Parameters
[in]enabledTrue to enable grid

◆ SetOriginVisual()

void sdf::v11::Scene::SetOriginVisual ( const bool  _enabled)

Set whether the origin visual should be enabled.

Parameters
[in]enabledTrue to enable origin visual

◆ SetShadows()

void sdf::v11::Scene::SetShadows ( const bool  _shadows)

Set whether shadows should be enabled.

Parameters
[in]enabledTrue to enable shadows

◆ SetSky()

void sdf::v11::Scene::SetSky ( const Sky _sky)

Set sky.

Parameters
[in]_skySky to set to

◆ Shadows()

bool sdf::v11::Scene::Shadows ( ) const

Get whether shadows are enabled.

Returns
True if shadows are enabled

◆ Sky()

const sdf::Sky* sdf::v11::Scene::Sky ( ) const

Get sky.

Returns
Sky

The documentation for this class was generated from the following file: