Gazebo Rendering

API Reference

6.6.4
gz/rendering/ogre/OgreMarker.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 
18 #ifndef GZ_RENDERING_OGRE_OGREMARKER_HH_
19 #define GZ_RENDERING_OGRE_OGREMARKER_HH_
20 
21 #include <memory>
25 
26 namespace ignition
27 {
28  namespace rendering
29  {
30  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
31  //
32  // Forward declaration
33  class OgreMarkerPrivate;
34 
36  class IGNITION_RENDERING_OGRE_VISIBLE OgreMarker
37  : public BaseMarker<OgreGeometry>
38  {
40  protected: OgreMarker();
41 
43  public: virtual ~OgreMarker();
44 
45  // Documentation inherited.
46  public: virtual void Init() override;
47 
48  // Documentation inherited.
49  public: virtual void PreRender() override;
50 
51  // Documentation inherited.
52  public: virtual void Destroy() override;
53 
54  // Documentation inherited.
55  public: virtual Ogre::MovableObject *OgreObject() const override;
56 
57  // Documentation inherited.
58  public: virtual MaterialPtr Material() const override;
59 
60  // Documentation inherited.
61  public: virtual void SetMaterial(
62  MaterialPtr _material, bool _unique) override;
63 
64  // Documentation inherited
65  public: virtual void SetPoint(unsigned int _index,
66  const gz::math::Vector3d &_value) override;
67 
68  // Documentation inherited
69  public: virtual void AddPoint(const gz::math::Vector3d &_pt,
70  const gz::math::Color &_color) override;
71 
72  // Documentation inherited
73  public: virtual void ClearPoints() override;
74 
75  // Documentation inherited
76  public: virtual void SetType(const MarkerType _markerType) override;
77 
78  // Documentation inherited
79  public: virtual MarkerType Type() const override;
80 
82  private: void Create();
83 
85  private: friend class OgreScene;
86 
88  private: std::unique_ptr<OgreMarkerPrivate> dataPtr;
89  };
90  }
91  }
92 }
93 #endif
Base implementation of a Marker geometry.
Definition: gz/rendering/base/BaseMarker.hh:36
Ogre implementation of a marker geometry.
Definition: gz/rendering/ogre/OgreMarker.hh:38
virtual Ogre::MovableObject * OgreObject() const override
virtual void SetMaterial(MaterialPtr _material, bool _unique) override
Set the materials of this Geometry.
virtual MarkerType Type() const override
Get the render type of this Marker.
virtual void PreRender() override
PreRender function.
virtual MaterialPtr Material() const override
Get the material of this geometry.
virtual void Destroy() override
Destroy function.
virtual void SetPoint(unsigned int _index, const gz::math::Vector3d &_value) override
Set an existing point's vector.
virtual void AddPoint(const gz::math::Vector3d &_pt, const gz::math::Color &_color) override
Add a point with its respective color to the marker.
virtual ~OgreMarker()
Destructor.
virtual void ClearPoints() override
Clear the points of the marker, if applicable.
virtual void Init() override
virtual void SetType(const MarkerType _markerType) override
Set the render type of this Marker.
Definition: gz/rendering/ogre/OgreScene.hh:41
MarkerType
Enum for marker types.
Definition: gz/rendering/Marker.hh:36