Ignition Rendering

API Reference

6.0.1
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 
99  private: friend class OgreScene;
100 
103  };
104  }
105  }
106 }
107 #ifdef _MSC_VER
108  #pragma warning(pop)
109 #endif
110 
111 #endif
Definition: BaseHeightmap.hh:30
Ogre implementation of a heightmap geometry.
Definition: Ogre2Heightmap.hh:50
Definition: OgreObject.hh:32
Describes how a Heightmap should be loaded.
Definition: HeightmapDescriptor.hh:146
Definition: OgreCamera.hh:27
Definition: OgreScene.hh:39
Represents a surface material of a Geometry.
Definition: Material.hh:47