Dem.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 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 _GAZEBO_DEM_HH_
19 #define _GAZEBO_DEM_HH_
20 
21 #include <gazebo/gazebo_config.h>
22 #include <gazebo/util/system.hh>
23 
24 #ifdef HAVE_GDAL
25 # include <string>
26 # include <vector>
27 
29 # include "gazebo/math/Angle.hh"
30 
31 namespace gazebo
32 {
33  namespace common
34  {
35  class DemPrivate;
36 
39 
43  {
45  public: Dem();
46 
48  public: virtual ~Dem();
49 
53  public: int Load(const std::string &_filename="");
54 
59  public: double GetElevation(double _x, double _y);
60 
63  public: float GetMinElevation() const;
64 
67  public: float GetMaxElevation() const;
68 
73  public: void GetGeoReferenceOrigin(math::Angle &_latitude,
74  math::Angle &_longitude);
75 
83  public: unsigned int GetHeight() const;
84 
92  public: unsigned int GetWidth() const;
93 
96  public: double GetWorldWidth() const;
97 
100  public: double GetWorldHeight() const;
101 
112  public: void FillHeightMap(int _subSampling, unsigned int _vertSize,
113  const math::Vector3 &_size, const math::Vector3 &_scale, bool _flipY,
114  std::vector<float> &_heights);
115 
122  private: void GetGeoReference(double _x, double _y,
123  math::Angle &_latitude,
124  math::Angle &_longitude);
125 
130  private: int LoadData();
131 
134  private: DemPrivate *dataPtr;
135  };
137  }
138 }
139 #endif
140 #endif
Definition: Dem.hh:42
Private data for the Dem class.
Definition: DemPrivate.hh:37
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
Encapsulates a generic heightmap data file.
Definition: HeightmapData.hh:34
An angle and related functions.
Definition: Angle.hh:52
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48