Gazebo Rendering

API Reference

8.2.1
Visual.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 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 GZ_RENDERING_VISUAL_HH_
18 #define GZ_RENDERING_VISUAL_HH_
19 
20 #include <string>
21 #include <gz/math/AxisAlignedBox.hh>
22 #include "gz/rendering/config.hh"
23 #include "gz/rendering/Node.hh"
24 
25 // overloaded-virtuals warnings appeared on Ubuntu Noble
26 // GCC-13. it is not easy to fix them without breaking ABI
27 // ignore them to preserve current ABI.
28 #if defined(__GNUC__) || defined(__clang__)
29 # pragma GCC diagnostic push
30 # pragma GCC diagnostic ignored "-Woverloaded-virtual"
31 #endif
32 
33 namespace gz
34 {
35  namespace rendering
36  {
37  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
41  class GZ_RENDERING_VISIBLE Visual :
42  public virtual Node
43  {
45  public: virtual ~Visual();
46 
49  public: virtual unsigned int GeometryCount() const = 0;
50 
54  public: virtual bool HasGeometry(ConstGeometryPtr _geometry) const = 0;
55 
60  public: virtual GeometryPtr GeometryByIndex(
61  unsigned int _index) const = 0;
62 
66  public: virtual void AddGeometry(GeometryPtr _geometry) = 0;
67 
72  public: virtual GeometryPtr RemoveGeometry(GeometryPtr _geometry) = 0;
73 
79  unsigned int _index) = 0;
80 
82  public: virtual void RemoveGeometries() = 0;
83 
90  public: virtual void SetMaterial(const std::string &_name,
91  bool _unique = true) = 0;
92 
96  public: virtual void SetMaterial(MaterialPtr _material,
97  bool _unique = true) = 0;
98 
102  public: virtual void SetChildMaterial(MaterialPtr _material,
103  bool _unique = true) = 0;
104 
108  public: virtual void SetGeometryMaterial(MaterialPtr _material,
109  bool _unique = true) = 0;
110 
115  public: virtual MaterialPtr Material() const = 0;
116 
119  public: virtual void SetWireframe(bool _show) = 0;
120 
123  public: virtual bool Wireframe() const = 0;
124 
127  public: virtual void SetVisible(bool _visible) = 0;
128 
173  public: virtual void SetStatic(bool _static) = 0;
174 
178  public: virtual bool Static() const = 0;
179 
182  public: virtual void SetVisibilityFlags(uint32_t _flags) = 0;
183 
186  public: virtual uint32_t VisibilityFlags() const = 0;
187 
190  public: virtual void AddVisibilityFlags(uint32_t _flags) = 0;
191 
194  public: virtual void RemoveVisibilityFlags(uint32_t _flags) = 0;
195 
198  public: virtual gz::math::AxisAlignedBox BoundingBox() const = 0;
199 
203  const = 0;
204 
211  public: virtual VisualPtr Clone(const std::string &_name,
212  NodePtr _newParent) const = 0;
213  };
214  }
215  }
216 }
217 
218 #if defined(__GNUC__) || defined(__clang__)
219 # pragma GCC diagnostic pop
220 #endif
221 
222 #endif