Loading...
Searching...
No Matches
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
28namespace 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
Definition Sky.hh:38
void SetSunset(double _time)
Set Sunset time.
void SetCloudDirection(const ignition::math::Angle &_angle)
Set cloud direction angle (angle around up axis)
void SetCloudSpeed(double _speed)
Set cloud speed.
double Sunset() const
Get sunset time.
Sky & operator=(const Sky &_sky)
Assignment operator.
Sky(const Sky &_sky)
Copy constructor.
Sky(Sky &&_sky) noexcept
Move constructor.
void SetTime(double _time)
Set time of day.
Sky()
Default constructor.
void SetSunrise(double _time)
Set Sunrise time.
Errors Load(ElementPtr _sdf)
Load the sky based on a element pointer.
ignition::math::Angle CloudDirection() const
Get cloud direction angle (angle around up axis)
double Time() const
Get time of day [0..24].
void SetCloudAmbient(const ignition::math::Color &_ambient)
Set cloud ambient color.
ignition::math::Color CloudAmbient() const
Get cloud ambient color.
double Sunrise() const
Get sunrise time.
~Sky()
Destructor.
double CloudMeanSize() const
Get cloud mean size.
void SetCloudMeanSize(double _size)
Set cloud mean siz.
void SetCloudHumidity(double _humidity)
Set cloud humidity.
double CloudHumidity() const
Get cloud humidity.
double CloudSpeed() const
Get cloud speed.
Sky & operator=(Sky &&_sky)
Move assignment operator.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
std::vector< Error > Errors
A vector of Error.
Definition Types.hh:89
std::shared_ptr< Element > ElementPtr
Definition Element.hh:53
namespace for Simulation Description Format parser
Definition Actor.hh:33
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition system_util.hh:48