Ignition Common
API Reference
4.5.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Ignition Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
graphics
include
ignition
common
Dem.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 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 IGNITION_COMMON_DEM_HH_
18
#define IGNITION_COMMON_DEM_HH_
19
20
#include <memory>
21
#include <
ignition/math/Vector3.hh
>
22
#include <
ignition/math/Angle.hh
>
23
24
#include <ignition/common/graphics/Export.hh>
25
26
#include <ignition/utils/ImplPtr.hh>
27
28
#ifdef HAVE_GDAL
29
# include <string>
30
# include <vector>
31
32
# include <
ignition/common/HeightmapData.hh
>
33
34
namespace
ignition
35
{
36
namespace
common
37
{
40
class
IGNITION_COMMON_GRAPHICS_VISIBLE Dem :
public
HeightmapData
41
{
43
public
: Dem();
44
46
public
:
virtual
~Dem();
47
51
public
:
int
Load(
const
std::string
&_filename =
""
);
52
57
public
:
double
Elevation(
double
_x,
double
_y);
58
61
public
:
float
MinElevation()
const
;
62
65
public
:
float
MaxElevation()
const
;
66
71
public
:
void
GeoReferenceOrigin(
ignition::math::Angle
&_latitude,
72
ignition::math::Angle
&_longitude)
const
;
73
81
public
:
unsigned
int
Height()
const
;
82
90
public
:
unsigned
int
Width()
const
;
91
94
public
:
double
WorldWidth()
const
;
95
98
public
:
double
WorldHeight()
const
;
99
110
public
:
void
FillHeightMap(
const
int
_subSampling,
111
const
unsigned
int
_vertSize,
112
const
ignition::math::Vector3d
&_size,
113
const
ignition::math::Vector3d
&_scale,
114
const
bool
_flipY,
115
std::vector<float>
&_heights);
116
123
private
:
void
GeoReference(
double
_x,
double
_y,
124
ignition::math::Angle
&_latitude,
125
ignition::math::Angle
&_longitude)
const
;
126
131
private
:
int
LoadData();
132
135
IGN_UTILS_IMPL_PTR(dataPtr)
136
};
137
}
138
}
139
#endif
140
#endif
ignition::math::Angle
Vector3.hh
HeightmapData.hh
std::string
STL class.
Angle.hh
std::vector
STL class.
ignition::math::Vector3
ignition
Forward declarations for the common classes.