Gazebo Rendering

API Reference

8.2.1
BaseHeightmap.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 #ifndef GZ_RENDERING_BASE_BASEHEIGHTMAP_HH_
18 #define GZ_RENDERING_BASE_BASEHEIGHTMAP_HH_
19 
21 
22 namespace gz
23 {
24  namespace rendering
25  {
26  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
27  //
29  template <class T>
30  class BaseHeightmap :
31  public virtual Heightmap,
32  public virtual T
33  {
36  protected: explicit BaseHeightmap(const HeightmapDescriptor &_desc);
37 
38  // Documentation inherited
39  public: virtual void PreRender() override;
40 
41  // Documentation inherited
42  public: virtual void Destroy() override;
43 
44  // Documentation inherited
45  public: virtual const HeightmapDescriptor &Descriptor() override;
46 
49  };
50 
52  template <class T>
54  : descriptor{_desc}
55  {
56  }
57 
59  template <class T>
61  {
62  T::PreRender();
63  }
64 
66  template <class T>
68  {
69  T::Destroy();
70  }
71 
73  template <class T>
75  {
76  return this->descriptor;
77  }
78  }
79  }
80 }
81 #endif