Gazebo Rendering

API Reference

6.6.3
gz/rendering/ogre/OgreDynamicLines.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_OGRE_OGREDYNAMICLINES_HH_
18 #define GZ_RENDERING_OGRE_OGREDYNAMICLINES_HH_
19 
20 #include <memory>
21 #include <vector>
22 #include <string>
23 #include <gz/math/Color.hh>
24 
25 #include "gz/rendering/ogre/Export.hh"
28 
29 namespace ignition
30 {
31  namespace rendering
32  {
33  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
35  class OgreDynamicLinesPrivate;
36 
37  /* \class OgreDynamicLines OgreDynamicLines.hh \
38  * ignition/rendering/ogre/OgreDynamicLines.hh
39  */
41  class IGNITION_RENDERING_OGRE_VISIBLE OgreDynamicLines :
43  {
46  public: explicit OgreDynamicLines(
47  MarkerType _opType = MT_LINE_STRIP);
48 
50  public: virtual ~OgreDynamicLines();
51 
55  public: void AddPoint(const gz::math::Vector3d &_pt,
56  const gz::math::Color &_color = gz::math::Color::White);
57 
63  public: void AddPoint(const double _x, const double _y, const double _z,
64  const gz::math::Color &_color = gz::math::Color::White);
65 
69  public: void SetPoint(unsigned int _index,
70  const gz::math::Vector3d &_value);
71 
76  public: void SetColor(unsigned int _index,
77  const gz::math::Color &_color);
78 
85  public: gz::math::Vector3d Point(unsigned int _index) const;
86 
89  public: unsigned int PointCount() const;
90 
92  public: void Clear();
93 
95  public: void Update();
96 
99  private: virtual void CreateVertexDeclaration();
100 
103  private: virtual void FillHardwareBuffers();
104 
107  };
108  }
109  }
110 }
111 #endif
@ MT_LINE_STRIP
Line strip primitive.
Definition: gz/rendering/Marker.hh:47
Class for drawing lines that can change.
Definition: gz/rendering/ogre/OgreDynamicLines.hh:41
Abstract base class providing mechanisms for dynamically growing hardware buffers.
Definition: gz/rendering/ogre/OgreDynamicRenderable.hh:36
MarkerType
Enum for marker types.
Definition: gz/rendering/Marker.hh:35