Gazebo Common

API Reference

5.6.0
gz/common/geospatial/HeightmapData.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 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_COMMON_GEOSPATIAL_HEIGHTMAPDATA_HH_
18 #define GZ_COMMON_GEOSPATIAL_HEIGHTMAPDATA_HH_
19 
20 #include <string>
21 #include <vector>
22 #include <gz/math/Vector3.hh>
23 #include <gz/common/geospatial/Export.hh>
24 
25 namespace gz
26 {
27  namespace common
28  {
30  class GZ_COMMON_GEOSPATIAL_VISIBLE HeightmapData
31  {
33  public: virtual ~HeightmapData() = default;
34 
45  public: virtual void FillHeightMap(int _subSampling,
46  unsigned int _vertSize, const math::Vector3d &_size,
47  const math::Vector3d &_scale, bool _flipY,
48  std::vector<float> &_heights) const = 0;
49 
52  public: virtual unsigned int Height() const = 0;
53 
56  public: virtual unsigned int Width() const = 0;
57 
60  public: virtual float MaxElevation() const = 0;
61 
64  public: virtual float MinElevation() const
65  {
66  return 0.0f;
67  }
68 
71  public: virtual std::string Filename() const = 0;
72  };
73  }
74 }
75 #endif