Ignition Rendering

API Reference

6.3.1
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 IGNITION_RENDERING_MARKER_HH_
18 #define IGNITION_RENDERING_MARKER_HH_
19 
20 #include <ignition/common/Time.hh>
21 #include <ignition/math/Color.hh>
22 #include <ignition/math/Vector3.hh>
23 #include "ignition/rendering/config.hh"
27 
28 namespace ignition
29 {
30  namespace rendering
31  {
32  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
33  //
35  enum IGNITION_RENDERING_VISIBLE MarkerType
36  {
38  MT_NONE = 0,
39 
41  MT_BOX = 1,
42 
45 
48 
51 
53  MT_POINTS = 5,
54 
56  MT_SPHERE = 6,
57 
59  MT_TEXT = 7,
60 
63 
66 
69 
71  MT_CAPSULE = 11,
72  };
73 
77  class IGNITION_RENDERING_VISIBLE Marker :
78  public virtual Geometry
79  {
80  protected: Marker();
81 
83  public: virtual ~Marker();
84 
87  public: virtual void SetLifetime(
88  const std::chrono::steady_clock::duration &_lifetime) = 0;
89 
92  public: virtual std::chrono::steady_clock::duration Lifetime() const = 0;
93 
96  public: virtual void SetLayer(int32_t _layer) = 0;
97 
100  public: virtual int32_t Layer() const = 0;
101 
104  public: virtual void SetType(
105  const ignition::rendering::MarkerType _markerType) = 0;
106 
109  public: virtual ignition::rendering::MarkerType Type() const = 0;
110 
114  public: virtual void SetSize(double _size) = 0;
115 
119  public: virtual double Size() const = 0;
120 
122  public: virtual void ClearPoints() = 0;
123 
129  public: virtual void AddPoint(double _x,
130  double _y, double _z,
131  const ignition::math::Color &_color) = 0;
132 
136  public: virtual void AddPoint(const ignition::math::Vector3d &_pt,
137  const ignition::math::Color &_color) = 0;
138 
142  public: virtual void SetPoint(unsigned int _index,
143  const ignition::math::Vector3d &_value) = 0;
144  };
145  }
146  }
147 }
148 
149 #endif
Capsule geometry.
Definition: Marker.hh:71
A marker geometry class. The marker&#39;s visual appearance is based on the marker type specified...
Definition: Marker.hh:77
Triangle fan primitive.
Definition: Marker.hh:62
Points primitive.
Definition: Marker.hh:53
Text geometry.
Definition: Marker.hh:59
MarkerType
Enum for marker types.
Definition: Marker.hh:35
Sphere geometry.
Definition: Marker.hh:56
Line list primitive.
Definition: Marker.hh:50
Cylinder geometry.
Definition: Marker.hh:44
Triangle strip primitive.
Definition: Marker.hh:68
Box geometry.
Definition: Marker.hh:41
Triangle list primitive.
Definition: Marker.hh:65
Line strip primitive.
Definition: Marker.hh:47
Represents a geometric shape to be rendered.
Definition: Geometry.hh:35
No type.
Definition: Marker.hh:38