Gazebo Rendering

API Reference

6.6.4
gz/rendering/ogre/OgreLidarVisual.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 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 IGNITION_RENDERING_OGRE_OGRELIDARVISUAL_HH_
19 #define IGNITION_RENDERING_OGRE_OGRELIDARVISUAL_HH_
20 
21 #include <vector>
22 #include <memory>
27 
28 namespace ignition
29 {
30  namespace rendering
31  {
32  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
33  //
34  // Forward declaration
35  class OgreLidarVisualPrivate;
36 
38  class IGNITION_RENDERING_OGRE_VISIBLE OgreLidarVisual
39  : public BaseLidarVisual<OgreVisual>
40  {
42  protected: OgreLidarVisual();
43 
45  public: virtual ~OgreLidarVisual();
46 
47  // Documentation inherited.
48  public: virtual void Init() override;
49 
50  // Documentation inherited.
51  public: virtual void PreRender() override;
52 
53  // Documentation inherited.
54  public: virtual void Destroy() override;
55 
56  // Documentation inherited
57  public: virtual void Update() override;
58 
59  // Documentation inherited
60  public: virtual void SetPoints(
61  const std::vector<double> &_points) override;
62 
63  // Documentation inherited
64  // This only affects lidar visuals with type LVT_POINTS
65  public: virtual void SetPoints(const std::vector<double> &_points,
67  override;
68 
69  // Documentation inherited
70  public: virtual void ClearPoints() override;
71 
72  // Documentation inherited
73  public: virtual unsigned int PointCount() const override;
74 
75  // Documentation inherited
76  public: virtual std::vector<double> Points() const override;
77 
79  private: void Create();
80 
82  private: void ClearVisualData();
83 
84  // Documentation inherited
85  public: virtual void SetVisible(bool _visible) override;
86 
88  private: friend class OgreScene;
89 
92  };
93  }
94  }
95 }
96 #endif
Base implementation of a Lidar Visual.
Definition: gz/rendering/base/BaseLidarVisual.hh:37
Ogre implementation of a Lidar Visual.
Definition: gz/rendering/ogre/OgreLidarVisual.hh:40
virtual void Update() override
Update the Visual.
virtual ~OgreLidarVisual()
Destructor.
virtual void SetVisible(bool _visible) override
Specify if this visual is visible.
virtual void SetPoints(const std::vector< double > &_points, const std::vector< ignition::math::Color > &_colors) override
Set lidar points to be visualised.
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
virtual std::vector< double > Points() const override
Get the points in laser data.
virtual void Destroy() override
Destroy any resources associated with this object. Invoking any other functions after destroying an o...
virtual void SetPoints(const std::vector< double > &_points) override
Set lidar points to be visualised.
virtual void ClearPoints() override
Clear the points of the lidar visual.
virtual void Init() override
virtual unsigned int PointCount() const override
Get number of points in laser data.
Definition: gz/rendering/ogre/OgreScene.hh:41