Loading...
Searching...
No Matches
Public Member Functions | List of all members
sdf::SDF_VERSION_NAMESPACE::Scene Class Reference

#include <Scene.hh>

Public Member Functions

 Scene ()
 Default constructor.
 
gz::math::Color Ambient () const
 Get the ambient color of the scene.
 
gz::math::Color Background () const
 Get the background color of the scene.
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load.
 
bool Grid () const
 Get whether grid is enabled.
 
Errors Load (ElementPtr _sdf)
 Load the scene based on a element pointer.
 
Errors Load (sdf::ElementPtr _sdf, const ParserConfig &_config)
 Load the scene based on a element pointer.
 
bool OriginVisual () const
 Get whether origin visual is enabled.
 
void SetAmbient (const gz::math::Color &_ambient)
 Set the ambient color of the scene.
 
void SetBackground (const gz::math::Color &_background)
 Set the background color of the scene.
 
void SetGrid (const bool _enabled)
 Set whether the grid should be enabled.
 
void SetOriginVisual (const bool _enabled)
 Set whether the origin visual should be enabled.
 
void SetShadows (const bool _shadows)
 Set whether shadows should be enabled.
 
void SetSky (const Sky &_sky)
 Set sky.
 
bool Shadows () const
 Get whether shadows are enabled.
 
const sdf::SkySky () const
 Get sky.
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this scene.
 
sdf::ElementPtr ToElement (sdf::Errors &_errors) const
 Create and return an SDF element filled with data from this scene.
 

Constructor & Destructor Documentation

◆ Scene()

sdf::SDF_VERSION_NAMESPACE::Scene::Scene ( )

Default constructor.

Member Function Documentation

◆ Ambient()

gz::math::Color sdf::SDF_VERSION_NAMESPACE::Scene::Ambient ( ) const

Get the ambient color of the scene.

Returns
Scene ambient color

◆ Background()

gz::math::Color sdf::SDF_VERSION_NAMESPACE::Scene::Background ( ) const

Get the background color of the scene.

Returns
Scene background color

◆ Element()

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::Scene::Grid ( ) const

Get whether grid is enabled.

Returns
True if grid is enabled

◆ Load() [1/2]

Errors sdf::SDF_VERSION_NAMESPACE::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.

◆ Load() [2/2]

Errors sdf::SDF_VERSION_NAMESPACE::Scene::Load ( sdf::ElementPtr  _sdf,
const ParserConfig _config 
)

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
[in]_configParser configuration
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::SDF_VERSION_NAMESPACE::Scene::OriginVisual ( ) const

Get whether origin visual is enabled.

Returns
True if origin visual is enabled

◆ SetAmbient()

void sdf::SDF_VERSION_NAMESPACE::Scene::SetAmbient ( const gz::math::Color &  _ambient)

Set the ambient color of the scene.

Parameters
[in]_ambientAmbient color to set to

◆ SetBackground()

void sdf::SDF_VERSION_NAMESPACE::Scene::SetBackground ( const gz::math::Color &  _background)

Set the background color of the scene.

Parameters
[in]_backgroundBackground color to set to

◆ SetGrid()

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

Set whether the grid should be enabled.

Parameters
[in]enabledTrue to enable grid

◆ SetOriginVisual()

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

Set whether the origin visual should be enabled.

Parameters
[in]enabledTrue to enable origin visual

◆ SetShadows()

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

Set whether shadows should be enabled.

Parameters
[in]enabledTrue to enable shadows

◆ SetSky()

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

Set sky.

Parameters
[in]_skySky to set to

◆ Shadows()

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

Get whether shadows are enabled.

Returns
True if shadows are enabled

◆ Sky()

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

Get sky.

Returns
Sky

◆ ToElement() [1/2]

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Scene::ToElement ( ) const

Create and return an SDF element filled with data from this scene.

Note that parameter passing functionality is not captured with this function.

Returns
SDF element pointer with updated scene values.

◆ ToElement() [2/2]

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Scene::ToElement ( sdf::Errors _errors) const

Create and return an SDF element filled with data from this scene.

Note that parameter passing functionality is not captured with this function.

Parameters
[out]_errorsVector of errors.
Returns
SDF element pointer with updated scene values.

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