Ignition Rendering

API Reference

5.0.0
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 
112  public: virtual void ClearPoints() = 0;
113 
119  public: virtual void AddPoint(double _x,
120  double _y, double _z,
121  const ignition::math::Color &_color) = 0;
122 
126  public: virtual void AddPoint(const ignition::math::Vector3d &_pt,
127  const ignition::math::Color &_color) = 0;
128 
132  public: virtual void SetPoint(unsigned int _index,
133  const ignition::math::Vector3d &_value) = 0;
134  };
135  }
136  }
137 }
138 
139 #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:34
No type.
Definition: Marker.hh:38