Class
List
Hierarchy
Modules
Common
Events
Math
Messages
Physics
Rendering
Sensors
Transport
Links
Gazebo Website
Wiki
Tutorials
Download
Report Documentation Issues
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gazebo
common
Dem.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2012-2014 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 <gdal/gdal_priv.h>
26
# include <string>
27
# include <vector>
28
29
# include "
gazebo/common/DemPrivate.hh
"
30
# include "
gazebo/common/HeightmapData.hh
"
31
# include "
gazebo/math/Angle.hh
"
32
33
namespace
gazebo
34
{
35
namespace
common
36
{
39
42
class
GAZEBO_VISIBLE
Dem
:
public
HeightmapData
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