Main MRPT website > C++ reference for MRPT 1.4.0
TPixelCoord.h
Go to the documentation of this file.
1/* +---------------------------------------------------------------------------+
2 | Mobile Robot Programming Toolkit (MRPT) |
3 | http://www.mrpt.org/ |
4 | |
5 | Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6 | See: http://www.mrpt.org/Authors - All rights reserved. |
7 | Released under BSD License. See details in http://www.mrpt.org/License |
8 +---------------------------------------------------------------------------+ */
9
10#ifndef mrpt_utils_tpixelcoord_H
11#define mrpt_utils_tpixelcoord_H
12
13#include <iosfwd>
15
16namespace mrpt
17{
18 namespace utils
19 {
20 /** A pair (x,y) of pixel coordinates (subpixel resolution). \ingroup mrpt_base_grp */
22 {
23 typedef float pixel_coord_t; //!< The type of \a x and \a y
24
25 float x,y;
26
27 /** Default constructor: undefined values of x,y */
28 TPixelCoordf() : x(),y() {}
29
30 /** Constructor from x,y values */
31 TPixelCoordf(const float _x,const float _y) : x(_x), y(_y) { }
32 };
33
34 std::ostream BASE_IMPEXP & operator <<(std::ostream& o, const TPixelCoordf& p); //!< Prints TPixelCoordf as "(x,y)"
35
36 /** A pair (x,y) of pixel coordinates (integer resolution). */
38 {
39 typedef int pixel_coord_t; //!< The type of \a x and \a y
40
41 TPixelCoord() : x(0),y(0) { }
42 TPixelCoord(const int _x,const int _y) : x(_x), y(_y) { }
43
44 int x,y;
45 };
46
47 std::ostream BASE_IMPEXP & operator <<(std::ostream& o, const TPixelCoord& p); //!< Prints TPixelCoord as "(x,y)"
48
49 typedef TPixelCoord TImageSize; //!< A type for image sizes.
50
51 } // end namespace
52}
53
54#endif
55
CStream BASE_IMPEXP & operator<<(mrpt::utils::CStream &s, const char *a)
TPixelCoord TImageSize
A type for image sizes.
Definition TPixelCoord.h:49
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A pair (x,y) of pixel coordinates (integer resolution).
Definition TPixelCoord.h:38
TPixelCoord(const int _x, const int _y)
Definition TPixelCoord.h:42
int pixel_coord_t
The type of x and y.
Definition TPixelCoord.h:39
A pair (x,y) of pixel coordinates (subpixel resolution).
Definition TPixelCoord.h:22
float pixel_coord_t
The type of x and y.
Definition TPixelCoord.h:23
TPixelCoordf(const float _x, const float _y)
Constructor from x,y values.
Definition TPixelCoord.h:31
TPixelCoordf()
Default constructor: undefined values of x,y.
Definition TPixelCoord.h:28



Page generated by Doxygen 1.9.8 for MRPT 1.4.0 SVN: at Thu Dec 14 16:41:50 UTC 2023