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 #include <ignition/utils/ImplPtr.hh>
23 
24 #include "sdf/Element.hh"
25 #include "sdf/Types.hh"
26 #include "sdf/sdf_config.h"
27 #include "sdf/system_util.hh"
28 
29 namespace sdf
30 {
31  // Inline bracket to help doxygen filtering.
32  inline namespace SDF_VERSION_NAMESPACE {
34  {
36  public: Sky();
37 
40  public: double Time() const;
41 
44  public: void SetTime(double _time);
45 
48  public: double Sunrise() const;
49 
52  public: void SetSunrise(double _time);
53 
56  public: double Sunset() const;
57 
60  public: void SetSunset(double _time);
61 
64  public: double CloudSpeed() const;
65 
68  public: void SetCloudSpeed(double _speed);
69 
72  public: ignition::math::Angle CloudDirection() const;
73 
76  public: void SetCloudDirection(const ignition::math::Angle &_angle);
77 
80  public: double CloudHumidity() const;
81 
84  public: void SetCloudHumidity(double _humidity);
85 
88  public: double CloudMeanSize() const;
89 
92  public: void SetCloudMeanSize(double _size);
93 
96  public: ignition::math::Color CloudAmbient() const;
97 
100  public: void SetCloudAmbient(const ignition::math::Color &_ambient);
101 
108  public: Errors Load(ElementPtr _sdf);
109 
114  public: sdf::ElementPtr Element() const;
115 
121  public: sdf::ElementPtr ToElement() const;
122 
124  IGN_UTILS_IMPL_PTR(dataPtr)
125  };
126  }
127 }
128 #endif
Definition: Sky.hh:34
ignition::math::Angle CloudDirection() const
Get cloud direction angle (angle around up axis)
void SetSunset(double _time)
Set Sunset time.
void SetCloudAmbient(const ignition::math::Color &_ambient)
Set cloud ambient color.
double Sunset() const
Get sunset time.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this sky.
void SetCloudDirection(const ignition::math::Angle &_angle)
Set cloud direction angle (angle around up axis)
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.
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.
double CloudHumidity() const
Get cloud humidity.
void SetCloudSpeed(double _speed)
Set cloud speed.
double Time() const
Get time of day [0..24].
ignition::math::Color CloudAmbient() const
Get cloud ambient color.
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