Ignition Rendering

API Reference

5.1.0
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 IGNITION_RENDERING_OGRE_OGREDYNAMICLINES_HH_
18 #define IGNITION_RENDERING_OGRE_OGREDYNAMICLINES_HH_
19 
20 #include <memory>
21 #include <vector>
22 #include <string>
23 #include <ignition/math/Color.hh>
24 
25 #include "ignition/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 ignition::math::Vector3d &_pt,
57 
63  public: void AddPoint(const double _x, const double _y, const double _z,
65 
69  public: void SetPoint(unsigned int _index,
70  const ignition::math::Vector3d &_value);
71 
76  public: void SetColor(unsigned int _index,
77  const ignition::math::Color &_color);
78 
85  public: ignition::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
MarkerType
Enum for marker types.
Definition: Marker.hh:35
static const Color White
Class for drawing lines that can change.
Definition: OgreDynamicLines.hh:41
Abstract base class providing mechanisms for dynamically growing hardware buffers.
Definition: OgreDynamicRenderable.hh:36
Line strip primitive.
Definition: Marker.hh:47