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 <ignition/math/Color.hh>
22 
23 #include "sdf/Element.hh"
24 #include "sdf/Types.hh"
25 #include "sdf/sdf_config.h"
26 #include "sdf/system_util.hh"
27 
28 namespace sdf
29 {
30  // Inline bracket to help doxygen filtering.
31  inline namespace SDF_VERSION_NAMESPACE {
32  //
33 
34  // Forward declarations.
35  class SkyPrivate;
36 
38  {
40  public: Sky();
41 
44  public: Sky(const Sky &_sky);
45 
48  public: Sky(Sky &&_sky) noexcept;
49 
51  public: ~Sky();
52 
56  public: Sky &operator=(const Sky &_sky);
57 
61  public: Sky &operator=(Sky &&_sky);
62 
65  public: double Time() const;
66 
69  public: void SetTime(double _time);
70 
73  public: double Sunrise() const;
74 
77  public: void SetSunrise(double _time);
78 
81  public: double Sunset() const;
82 
85  public: void SetSunset(double _time);
86 
89  public: double CloudSpeed() const;
90 
93  public: void SetCloudSpeed(double _speed);
94 
97  public: ignition::math::Angle CloudDirection() const;
98 
101  public: void SetCloudDirection(const ignition::math::Angle &_angle);
102 
105  public: double CloudHumidity() const;
106 
109  public: void SetCloudHumidity(double _humidity);
110 
113  public: double CloudMeanSize() const;
114 
117  public: void SetCloudMeanSize(double _size);
118 
121  public: ignition::math::Color CloudAmbient() const;
122 
125  public: void SetCloudAmbient(const ignition::math::Color &_ambient);
126 
133  public: Errors Load(ElementPtr _sdf);
134 
139  public: sdf::ElementPtr Element() const;
140 
142  private: SkyPrivate *dataPtr = nullptr;
143  };
144  }
145 }
146 #endif
class SDFORMAT_VISIBLE Element
Definition: Element.hh:49
Definition: Sky.hh:37
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:48
A Time class, can be used to hold wall- or sim-time.
Definition: Types.hh:159
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:53
namespace for Simulation Description Format parser
Definition: Actor.hh:32
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:95