Gazebo Rendering

API Reference

7.4.2
gz/rendering/Marker.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 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_MARKER_HH_
18 #define GZ_RENDERING_MARKER_HH_
19 
20 #include <gz/math/Color.hh>
21 #include <gz/math/Vector3.hh>
22 #include "gz/rendering/config.hh"
23 #include "gz/rendering/Geometry.hh"
24 #include "gz/rendering/Object.hh"
26 
27 namespace gz
28 {
29  namespace rendering
30  {
31  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
32  //
34  enum GZ_RENDERING_VISIBLE MarkerType
35  {
37  MT_NONE = 0,
38 
40  MT_BOX = 1,
41 
44 
47 
50 
52  MT_POINTS = 5,
53 
55  MT_SPHERE = 6,
56 
58  MT_TEXT = 7,
59 
62 
65 
68 
70  MT_CAPSULE = 11,
71  };
72 
76  class GZ_RENDERING_VISIBLE Marker :
77  public virtual Geometry
78  {
79  protected: Marker();
80 
82  public: virtual ~Marker();
83 
86  public: virtual void SetLifetime(
87  const std::chrono::steady_clock::duration &_lifetime) = 0;
88 
91  public: virtual std::chrono::steady_clock::duration Lifetime() const = 0;
92 
95  public: virtual void SetLayer(int32_t _layer) = 0;
96 
99  public: virtual int32_t Layer() const = 0;
100 
103  public: virtual void SetType(
104  const gz::rendering::MarkerType _markerType) = 0;
105 
108  public: virtual gz::rendering::MarkerType Type() const = 0;
109 
113  public: virtual void SetSize(double _size) = 0;
114 
118  public: virtual double Size() const = 0;
119 
121  public: virtual void ClearPoints() = 0;
122 
128  public: virtual void AddPoint(double _x,
129  double _y, double _z,
130  const gz::math::Color &_color) = 0;
131 
135  public: virtual void AddPoint(const gz::math::Vector3d &_pt,
136  const gz::math::Color &_color) = 0;
137 
141  public: virtual void SetPoint(unsigned int _index,
142  const gz::math::Vector3d &_value) = 0;
143  };
144  }
145  }
146 }
147 
148 #endif