Sky.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2020 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef SDF_SKY_HH_
19 #define SDF_SKY_HH_
20 
21 #include <string>
22 
23 #include <gz/math/Color.hh>
24 #include <gz/utils/ImplPtr.hh>
25 
26 #include "sdf/Element.hh"
27 #include "sdf/Types.hh"
28 #include "sdf/sdf_config.h"
29 #include "sdf/system_util.hh"
30 
31 namespace sdf
32 {
33  // Inline bracket to help doxygen filtering.
34  inline namespace SDF_VERSION_NAMESPACE {
36  {
38  public: Sky();
39 
42  public: double Time() const;
43 
46  public: void SetTime(double _time);
47 
50  public: double Sunrise() const;
51 
54  public: void SetSunrise(double _time);
55 
58  public: double Sunset() const;
59 
62  public: void SetSunset(double _time);
63 
66  public: double CloudSpeed() const;
67 
70  public: void SetCloudSpeed(double _speed);
71 
74  public: gz::math::Angle CloudDirection() const;
75 
78  public: void SetCloudDirection(const gz::math::Angle &_angle);
79 
82  public: double CloudHumidity() const;
83 
86  public: void SetCloudHumidity(double _humidity);
87 
90  public: double CloudMeanSize() const;
91 
94  public: void SetCloudMeanSize(double _size);
95 
98  public: gz::math::Color CloudAmbient() const;
99 
102  public: void SetCloudAmbient(const gz::math::Color &_ambient);
103 
106  public: const std::string &CubemapUri() const;
107 
110  public: void SetCubemapUri(const std::string &_uri);
111 
118  public: Errors Load(ElementPtr _sdf);
119 
124  public: sdf::ElementPtr Element() const;
125 
131  public: sdf::ElementPtr ToElement() const;
132 
134  IGN_UTILS_IMPL_PTR(dataPtr)
135  };
136  }
137 }
138 #endif
Definition: Sky.hh:36
void SetSunset(double _time)
Set Sunset time.
void SetCloudDirection(const gz::math::Angle &_angle)
Set cloud direction angle (angle around up axis)
void SetCubemapUri(const std::string &_uri)
Set the skybox texture URI.
const std::string & CubemapUri() const
Get the skybox texture URI.
double Sunset() const
Get sunset time.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this sky.
void SetSunrise(double _time)
Set Sunrise time.
double CloudSpeed() const
Get cloud speed.
double Sunrise() const
Get sunrise time.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
void SetTime(double _time)
Set time of day.
double CloudMeanSize() const
Get cloud mean size.
gz::math::Color CloudAmbient() const
Get cloud ambient color.
void SetCloudMeanSize(double _size)
Set cloud mean siz.
Sky()
Default constructor.
void SetCloudHumidity(double _humidity)
Set cloud humidity.
Errors Load(ElementPtr _sdf)
Load the sky based on a element pointer.
void SetCloudAmbient(const gz::math::Color &_ambient)
Set cloud ambient color.
double CloudHumidity() const
Get cloud humidity.
gz::math::Angle CloudDirection() const
Get cloud direction angle (angle around up axis)
void SetCloudSpeed(double _speed)
Set cloud speed.
double Time() const
Get time of day [0..24].
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:106
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:54
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25