Projector.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2023 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_PROJECTOR_HH_
18 #define SDF_PROJECTOR_HH_
19 
20 #include <memory>
21 #include <string>
22 
23 #include <gz/math/Angle.hh>
24 #include <gz/math/Pose3.hh>
25 #include <gz/math/Vector3.hh>
26 
27 #include "sdf/Plugin.hh"
28 #include "sdf/SemanticPose.hh"
29 #include "sdf/Types.hh"
30 #include "sdf/sdf_config.h"
31 #include "sdf/system_util.hh"
32 
33 namespace sdf
34 {
35  // Inline bracket to help doxygen filtering.
36  inline namespace SDF_VERSION_NAMESPACE {
37  // Forward declarations.
38  struct PoseRelativeToGraph;
39 
44  {
46  public: Projector();
47 
54  public: Errors Load(ElementPtr _sdf);
55 
60  public: std::string Name() const;
61 
66  public: void SetName(const std::string &_name);
67 
70  public: double NearClip() const;
71 
74  public: void SetNearClip(double _near);
75 
78  public: double FarClip() const;
79 
82  public: void SetFarClip(double _far);
83 
86  public: gz::math::Angle HorizontalFov() const;
87 
90  public: void SetHorizontalFov(const gz::math::Angle &_hfov);
91 
94  public: uint32_t VisibilityFlags() const;
95 
98  public: void SetVisibilityFlags(uint32_t _flags);
99 
104  public: std::string Texture() const;
105 
108  public: void SetTexture(const std::string &_map);
109 
113  public: const sdf::Plugins &Plugins() const;
114 
118  public: sdf::Plugins &Plugins();
119 
121  public: void ClearPlugins();
122 
125  public: void AddPlugin(const Plugin &_plugin);
126 
131  public: const gz::math::Pose3d &RawPose() const;
132 
136  public: void SetRawPose(const gz::math::Pose3d &_pose);
137 
142  public: const std::string &PoseRelativeTo() const;
143 
148  public: void SetPoseRelativeTo(const std::string &_frame);
149 
152  public: sdf::SemanticPose SemanticPose() const;
153 
157  public: sdf::ElementPtr Element() const;
158 
161  public: const std::string &FilePath() const;
162 
165  public: void SetFilePath(const std::string &_filePath);
166 
172  public: sdf::ElementPtr ToElement() const;
173 
178  private: void SetXmlParentName(const std::string &_xmlParentName);
179 
184  private: void SetPoseRelativeToGraph(
186 
190  friend class Link;
191 
193  GZ_UTILS_IMPL_PTR(dataPtr)
194  };
195  }
196 }
197 #endif
sdf
namespace for Simulation Description Format parser
Definition: Actor.hh:34
Types.hh
SemanticPose.hh
sdf_config.h
SDFORMAT_VISIBLE
#define SDFORMAT_VISIBLE
Definition: system_util.hh:25
sdf::SDF_VERSION_NAMESPACE::Plugin
Definition: Plugin.hh:45
sdf::SDF_VERSION_NAMESPACE::Element
class GZ_SDFORMAT_VISIBLE Element
Definition: Element.hh:51
sdf::SDF_VERSION_NAMESPACE::SemanticPose
SemanticPose is a data structure that can be used by different DOM objects to resolve poses on a Pose...
Definition: SemanticPose.hh:54
sdf::SDF_VERSION_NAMESPACE::Errors
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:80
sdf::SDF_VERSION_NAMESPACE::ScopedGraph
Definition: Collision.hh:40
system_util.hh
Plugin.hh
sdf::SDF_VERSION_NAMESPACE::Plugins
std::vector< Plugin > Plugins
A vector of Plugin.
Definition: Plugin.hh:245
sdf::SDF_VERSION_NAMESPACE::Projector
A description of a projector, which can be attached to a link.
Definition: Projector.hh:43
sdf::SDF_VERSION_NAMESPACE::ElementPtr
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:55