Gazebo Rendering

API Reference

7.4.2
gz/rendering/ogre2/Ogre2Heightmap.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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_OGRE2_OGRE2HEIGHTMAP_HH_
19 #define GZ_RENDERING_OGRE2_OGRE2HEIGHTMAP_HH_
20 
21 #include <memory>
22 
25 
26 // Ignoring warning: "non dll-interface class
27 // 'gz::rendering::v5::Heightmap' used as base for dll-interface class"
28 // because `Heightmap` and `BaseHeightmap` are header-only
29 #ifdef _MSC_VER
30  #pragma warning(push)
31  #pragma warning(disable:4275)
32 #endif
33 
34 namespace Ogre
35 {
36  class Camera;
37  class Terra;
38 }
39 
40 namespace gz
41 {
42  namespace rendering
43  {
44  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
45  //
46  // Forward declaration
47  class Ogre2HeightmapPrivate;
48 
50  class GZ_RENDERING_OGRE2_VISIBLE Ogre2Heightmap
51  : public BaseHeightmap<Ogre2Geometry>
52  {
56  public: explicit Ogre2Heightmap(const HeightmapDescriptor &_desc);
57 
59  public: virtual ~Ogre2Heightmap() override;
60 
61  // Documentation inherited.
62  public: virtual void Init() override;
63 
64  // Documentation inherited.
65  public: virtual void PreRender() override;
66 
71  public: virtual Ogre::MovableObject *OgreObject() const override;
72 
76  public: virtual MaterialPtr Material() const override;
77 
82  public: virtual void SetMaterial(MaterialPtr _material, bool _unique)
83  override;
84 
88  public: Ogre::Terra* Terra();
89 
96  public: void UpdateForRender(Ogre::Camera *_activeCamera);
97 
98  // Documentation inherited.
99  // \todo(iche033) rename this to Destroy and
100  // make this function public and virtual
101  private: void DestroyImpl();
102 
104  private: friend class OgreScene;
105 
108  };
109  }
110  }
111 }
112 #ifdef _MSC_VER
113  #pragma warning(pop)
114 #endif
115 
116 #endif