Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
utils
TPixelCoord.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
3
| |
4
| http://www.mrpt.org/ |
5
| |
6
| Copyright (C) 2005-2012 University of Malaga |
7
| |
8
| This software was written by the Machine Perception and Intelligent |
9
| Robotics Lab, University of Malaga (Spain). |
10
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11
| |
12
| This file is part of the MRPT project. |
13
| |
14
| MRPT is free software: you can redistribute it and/or modify |
15
| it under the terms of the GNU General Public License as published by |
16
| the Free Software Foundation, either version 3 of the License, or |
17
| (at your option) any later version. |
18
| |
19
| MRPT is distributed in the hope that it will be useful, |
20
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
| GNU General Public License for more details. |
23
| |
24
| You should have received a copy of the GNU General Public License |
25
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26
| |
27
+---------------------------------------------------------------------------+ */
28
29
#ifndef mrpt_utils_tpixelcoord_H
30
#define mrpt_utils_tpixelcoord_H
31
32
#include <iostream>
33
#include <
mrpt/base/link_pragmas.h
>
34
35
namespace
mrpt
36
{
37
namespace
utils
38
{
39
/** A pair (x,y) of pixel coordinates (subpixel resolution). \ingroup mrpt_base_grp */
40
struct
BASE_IMPEXP
TPixelCoordf
41
{
42
typedef
float
pixel_coord_t
;
//!< The type of \a x and \a y
43
44
float
x,
y
;
45
46
/** Default constructor: undefined values of x,y */
47
TPixelCoordf
() : x(),y() {}
48
49
/** Constructor from x,y values */
50
TPixelCoordf
(
const
float
_x,
const
float
_y) : x(_x), y(_y) { }
51
};
52
53
std::ostream
BASE_IMPEXP
&
operator <<
(std::ostream& o,
const
TPixelCoordf& p);
//!< Prints TPixelCoordf as "(x,y)"
54
55
/** A pair (x,y) of pixel coordinates (integer resolution). */
56
struct
BASE_IMPEXP
TPixelCoord
57
{
58
typedef
int
pixel_coord_t
;
//!< The type of \a x and \a y
59
60
TPixelCoord
() : x(0),y(0) { }
61
TPixelCoord
(
const
int
_x,
const
int
_y) : x(_x), y(_y) { }
62
63
int
x,
y
;
64
};
65
66
std::ostream
BASE_IMPEXP
&
operator <<
(std::ostream& o,
const
TPixelCoord
& p);
//!< Prints TPixelCoord as "(x,y)"
67
68
typedef
TPixelCoord
TImageSize
;
//!< A type for image sizes.
69
70
}
// end namespace
71
}
72
73
#endif
74
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013