All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
World.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2017 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 #ifndef SDF_WORLD_HH_
18 #define SDF_WORLD_HH_
19 
20 #include <string>
21 
22 #include "sdf/Element.hh"
23 #include "sdf/Types.hh"
24 #include "sdf/system_util.hh"
25 
26 namespace sdf
27 {
28  // Forward declare private data class.
29  class WorldPrivate;
30 
32  {
34  public: World();
35 
38  public: World(World &&_world);
39 
41  public: ~World();
42 
49  public: Errors Load(ElementPtr _sdf);
50 
53  public: std::string Name() const;
54 
57  public: void SetName(const std::string &_name) const;
58 
63  public: std::string AudioDevice() const;
64 
69  public: void SetAudioDevice(const std::string &_device);
70 
75  public: ignition::math::Vector3d WindLinearVelocity() const;
76 
81  public: void SetWindLinearVelocity(const ignition::math::Vector3d &_wind);
82 
88  public: ignition::math::Vector3d Gravity() const;
89 
93  public: void SetGravity(const ignition::math::Vector3d &_gravity);
94 
101  public: ignition::math::Vector3d MagneticField() const;
102 
109  public: void SetMagneticField(const ignition::math::Vector3d &_mag);
110 
112  private: WorldPrivate *dataPtr = nullptr;
113  };
114 }
115 #endif
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:69
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:48
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:45
Definition: World.hh:31