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

#include <Sky.hh>

Public Member Functions

 Sky ()
 Default constructor.
 
gz::math::Color CloudAmbient () const
 Get cloud ambient color.
 
gz::math::Angle CloudDirection () const
 Get cloud direction angle (angle around up axis)
 
double CloudHumidity () const
 Get cloud humidity.
 
double CloudMeanSize () const
 Get cloud mean size.
 
double CloudSpeed () const
 Get cloud speed.
 
const std::string & CubemapUri () const
 Get the skybox texture URI.
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load.
 
Errors Load (ElementPtr _sdf)
 Load the sky based on a element pointer.
 
Errors Load (ElementPtr _sdf, const ParserConfig &_config)
 Load the sky based on a element pointer.
 
void SetCloudAmbient (const gz::math::Color &_ambient)
 Set cloud ambient color.
 
void SetCloudDirection (const gz::math::Angle &_angle)
 Set cloud direction angle (angle around up axis)
 
void SetCloudHumidity (double _humidity)
 Set cloud humidity.
 
void SetCloudMeanSize (double _size)
 Set cloud mean siz.
 
void SetCloudSpeed (double _speed)
 Set cloud speed.
 
void SetCubemapUri (const std::string &_uri)
 Set the skybox texture URI.
 
void SetSunrise (double _time)
 Set Sunrise time.
 
void SetSunset (double _time)
 Set Sunset time.
 
void SetTime (double _time)
 Set time of day.
 
double Sunrise () const
 Get sunrise time.
 
double Sunset () const
 Get sunset time.
 
double Time () const
 Get time of day [0..24].
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this sky.
 
sdf::ElementPtr ToElement (sdf::Errors &_errors) const
 Create and return an SDF element filled with data from this sky.
 

Constructor & Destructor Documentation

◆ Sky()

sdf::SDF_VERSION_NAMESPACE::Sky::Sky ( )

Default constructor.

Member Function Documentation

◆ CloudAmbient()

gz::math::Color sdf::SDF_VERSION_NAMESPACE::Sky::CloudAmbient ( ) const

Get cloud ambient color.

Returns
cloud ambient color

◆ CloudDirection()

gz::math::Angle sdf::SDF_VERSION_NAMESPACE::Sky::CloudDirection ( ) const

Get cloud direction angle (angle around up axis)

Returns
cloud direction angle in world frame

◆ CloudHumidity()

double sdf::SDF_VERSION_NAMESPACE::Sky::CloudHumidity ( ) const

Get cloud humidity.

Returns
cloud humidity [0..1]

◆ CloudMeanSize()

double sdf::SDF_VERSION_NAMESPACE::Sky::CloudMeanSize ( ) const

Get cloud mean size.

Returns
cloud mean size [0..1]

◆ CloudSpeed()

double sdf::SDF_VERSION_NAMESPACE::Sky::CloudSpeed ( ) const

Get cloud speed.

Returns
cloud speed in meters per second

◆ CubemapUri()

const std::string & sdf::SDF_VERSION_NAMESPACE::Sky::CubemapUri ( ) const

Get the skybox texture URI.

Returns
The URI of the skybox texture.

◆ Element()

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

◆ Load() [1/2]

Errors sdf::SDF_VERSION_NAMESPACE::Sky::Load ( ElementPtr  _sdf)

Load the sky 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::Sky::Load ( ElementPtr  _sdf,
const ParserConfig _config 
)

Load the sky 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.

◆ SetCloudAmbient()

void sdf::SDF_VERSION_NAMESPACE::Sky::SetCloudAmbient ( const gz::math::Color &  _ambient)

Set cloud ambient color.

Parameters
[in]_ambientcloud ambient color

◆ SetCloudDirection()

void sdf::SDF_VERSION_NAMESPACE::Sky::SetCloudDirection ( const gz::math::Angle &  _angle)

Set cloud direction angle (angle around up axis)

Parameters
[in]_angleCloud direction angle in world frame.

◆ SetCloudHumidity()

void sdf::SDF_VERSION_NAMESPACE::Sky::SetCloudHumidity ( double  _humidity)

Set cloud humidity.

Parameters
[in]_humiditycloud humidity [0..1]

◆ SetCloudMeanSize()

void sdf::SDF_VERSION_NAMESPACE::Sky::SetCloudMeanSize ( double  _size)

Set cloud mean siz.

Parameters
[in]_sizecloud mean size [0..1]

◆ SetCloudSpeed()

void sdf::SDF_VERSION_NAMESPACE::Sky::SetCloudSpeed ( double  _speed)

Set cloud speed.

Parameters
[in]_speedcloud speed in meters per second.

◆ SetCubemapUri()

void sdf::SDF_VERSION_NAMESPACE::Sky::SetCubemapUri ( const std::string &  _uri)

Set the skybox texture URI.

Parameters
[in]_uriThe URI of the skybox texture.

◆ SetSunrise()

void sdf::SDF_VERSION_NAMESPACE::Sky::SetSunrise ( double  _time)

Set Sunrise time.

Parameters
[in]_timeSunrise time [0..24]

◆ SetSunset()

void sdf::SDF_VERSION_NAMESPACE::Sky::SetSunset ( double  _time)

Set Sunset time.

Parameters
[in]_timeSunset time [0..24]

◆ SetTime()

void sdf::SDF_VERSION_NAMESPACE::Sky::SetTime ( double  _time)

Set time of day.

Parameters
[in]_timeTime of day [0..24]

◆ Sunrise()

double sdf::SDF_VERSION_NAMESPACE::Sky::Sunrise ( ) const

Get sunrise time.

Returns
sunrise time [0..24]

◆ Sunset()

double sdf::SDF_VERSION_NAMESPACE::Sky::Sunset ( ) const

Get sunset time.

Returns
sunset time [0..24]

◆ Time()

double sdf::SDF_VERSION_NAMESPACE::Sky::Time ( ) const

Get time of day [0..24].

Returns
Time of day

◆ ToElement() [1/2]

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

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

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

Returns
SDF element pointer with updated sky values.

◆ ToElement() [2/2]

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

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

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

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

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