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
29namespace 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
117 IGN_UTILS_IMPL_PTR(dataPtr)
118 };
119 }
120}
121#endif
Definition: Sky.hh:34
double Time() const
Get time of day [0..24].
double Sunset() const
Get sunset time.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
ignition::math::Angle CloudDirection() const
Get cloud direction angle (angle around up axis)
void SetSunset(double _time)
Set Sunset time.
ignition::math::Color CloudAmbient() const
Get cloud ambient color.
void SetTime(double _time)
Set time of day.
void SetCloudAmbient(const ignition::math::Color &_ambient)
Set cloud ambient color.
void SetCloudDirection(const ignition::math::Angle &_angle)
Set cloud direction angle (angle around up axis)
double CloudMeanSize() const
Get cloud mean size.
Errors Load(ElementPtr _sdf)
Load the sky based on a element pointer.
double CloudHumidity() const
Get cloud humidity.
void SetCloudHumidity(double _humidity)
Set cloud humidity.
void SetSunrise(double _time)
Set Sunrise time.
double Sunrise() const
Get sunrise time.
double CloudSpeed() const
Get cloud speed.
void SetCloudSpeed(double _speed)
Set cloud speed.
void SetCloudMeanSize(double _size)
Set cloud mean siz.
Sky()
Default constructor.
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:34
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:41