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
ImageHeightmap.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 _IMAGE_HEIGHTMAP_DATA_HH_
19
#define _IMAGE_HEIGHTMAP_DATA_HH_
20
21
#include <string>
22
#include <vector>
23
#include "
gazebo/common/HeightmapData.hh
"
24
#include "
gazebo/common/Image.hh
"
25
#include "
gazebo/math/Vector3.hh
"
26
#include "
gazebo/util/system.hh
"
27
28
namespace
gazebo
29
{
30
namespace
common
31
{
34
37
class
GAZEBO_VISIBLE
ImageHeightmap
38
:
public
gazebo::common::HeightmapData
39
{
42
public
:
ImageHeightmap
();
43
47
public
:
int
Load(
const
std::string &_filename=
""
);
48
49
// Documentation inherited.
50
public
:
void
FillHeightMap(
int
_subSampling,
unsigned
int
_vertSize,
51
const
math::Vector3
&_size,
const
math::Vector3
&_scale,
bool
_flipY,
52
std::vector<float> &_heights);
53
56
public
: std::string GetFilename()
const
;
57
58
// Documentation inherited.
59
public
:
unsigned
int
GetHeight()
const
;
60
61
// Documentation inherited.
62
public
:
unsigned
int
GetWidth()
const
;
63
64
// Documentation inherited.
65
public
:
float
GetMaxElevation()
const
;
66
68
private
:
gazebo::common::Image
img;
69
};
71
}
72
}
73
#endif