Gazebo Rendering

API Reference

6.6.3
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 IGNITION_RENDERING_OGRE2_OGRE2HEIGHTMAP_HH_
19 #define IGNITION_RENDERING_OGRE2_OGRE2HEIGHTMAP_HH_
20 
21 #include <memory>
22 
25 
26 // Ignoring warning: "non dll-interface class
27 // 'ignition::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 ignition
41 {
42  namespace rendering
43  {
44  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
45  //
46  // Forward declaration
47  class Ogre2HeightmapPrivate;
48 
50  class IGNITION_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
Definition: gz/rendering/ogre/OgreCamera.hh:27
STL class.
Definition: gz/rendering/ogre/OgreScene.hh:39
Describes how a Heightmap should be loaded.
Definition: gz/rendering/HeightmapDescriptor.hh:146
Ogre implementation of a heightmap geometry.
Definition: gz/rendering/ogre2/Ogre2Heightmap.hh:50
Definition: gz/rendering/ogre/OgreObject.hh:32
Definition: gz/rendering/base/BaseHeightmap.hh:30
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47