Visual.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2018 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_VISUAL_HH_
18 #define SDF_VISUAL_HH_
19 
20 #include <string>
21 #include <ignition/math/Pose3.hh>
22 #include "sdf/Box.hh"
23 #include "sdf/Cylinder.hh"
24 #include "sdf/Element.hh"
25 #include "sdf/Material.hh"
26 #include "sdf/Plane.hh"
27 #include "sdf/Sphere.hh"
28 #include "sdf/Types.hh"
29 #include "sdf/sdf_config.h"
30 #include "sdf/system_util.hh"
31 
32 namespace sdf
33 {
34  // Inline bracket to help doxygen filtering.
35  inline namespace SDF_VERSION_NAMESPACE {
36  //
37 
38  // Forward declarations.
39  class VisualPrivate;
40  class Geometry;
41 
43  {
45  public: Visual();
46 
49  public: Visual(const Visual &_visual);
50 
53  public: Visual(Visual &&_visual) noexcept;
54 
58  public: Visual &operator=(Visual &&_visual);
59 
63  public: Visual &operator=(const Visual &_visual);
64 
66  public: ~Visual();
67 
74  public: Errors Load(ElementPtr _sdf);
75 
79  public: std::string Name() const;
80 
84  public: void SetName(const std::string &_name) const;
85 
88  public: const Geometry *Geom() const;
89 
92  public: void SetGeom(const Geometry &_geom);
93 
98  public: const ignition::math::Pose3d &Pose() const;
99 
103  public: void SetPose(const ignition::math::Pose3d &_pose);
104 
109  public: const std::string &PoseFrame() const;
110 
115  public: void SetPoseFrame(const std::string &_pose);
116 
121  public: sdf::ElementPtr Element() const;
122 
127  public: sdf::Material *Material() const;
128 
131  public: void SetMaterial(const sdf::Material &_material);
132 
134  private: VisualPrivate *dataPtr = nullptr;
135  };
136  }
137 }
138 #endif
Geometry provides access to a shape, such as a Box.
Definition: Geometry.hh:65
class SDFORMAT_VISIBLE Element
Definition: Element.hh:47
Definition: Visual.hh:42
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:51
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:74
This class contains visual material properties.
Definition: Material.hh:45
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:48
namespace for Simulation Description Format parser
Definition: AirPressure.hh:25