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 {
35  //
36 
37  // Forward declarations.
38  class ParserConfig;
39 
41  {
43  public: Sky();
44 
47  public: double Time() const;
48 
51  public: void SetTime(double _time);
52 
55  public: double Sunrise() const;
56 
59  public: void SetSunrise(double _time);
60 
63  public: double Sunset() const;
64 
67  public: void SetSunset(double _time);
68 
71  public: double CloudSpeed() const;
72 
75  public: void SetCloudSpeed(double _speed);
76 
79  public: gz::math::Angle CloudDirection() const;
80 
83  public: void SetCloudDirection(const gz::math::Angle &_angle);
84 
87  public: double CloudHumidity() const;
88 
91  public: void SetCloudHumidity(double _humidity);
92 
95  public: double CloudMeanSize() const;
96 
99  public: void SetCloudMeanSize(double _size);
100 
103  public: gz::math::Color CloudAmbient() const;
104 
107  public: void SetCloudAmbient(const gz::math::Color &_ambient);
108 
111  public: const std::string &CubemapUri() const;
112 
115  public: void SetCubemapUri(const std::string &_uri);
116 
123  public: Errors Load(ElementPtr _sdf);
124 
131  public: Errors Load(ElementPtr _sdf, const ParserConfig &_config);
132 
137  public: sdf::ElementPtr Element() const;
138 
144  public: sdf::ElementPtr ToElement() const;
145 
152  public: sdf::ElementPtr ToElement(sdf::Errors &_errors) const;
153 
155  GZ_UTILS_IMPL_PTR(dataPtr)
156  };
157  }
158 }
159 #endif
sdf::SDF_VERSION_NAMESPACE::Sky
Definition: Sky.hh:40
sdf
namespace for Simulation Description Format parser
Definition: Actor.hh:34
Types.hh
sdf_config.h
sdf::SDF_VERSION_NAMESPACE::Time
A Time class, can be used to hold wall- or sim-time.
Definition: Types.hh:91
SDFORMAT_VISIBLE
#define SDFORMAT_VISIBLE
Definition: system_util.hh:25
sdf::SDF_VERSION_NAMESPACE::ParserConfig
This class contains configuration options for the libsdformat parser.
Definition: ParserConfig.hh:84
sdf::SDF_VERSION_NAMESPACE::Element
class GZ_SDFORMAT_VISIBLE Element
Definition: Element.hh:51
sdf::SDF_VERSION_NAMESPACE::Errors
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:80
system_util.hh
sdf::SDF_VERSION_NAMESPACE::ElementPtr
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:55
Element.hh