Main MRPT website > C++ reference for MRPT 1.9.9
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-2017, 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>
14 
15 namespace mrpt
16 {
17 namespace utils
18 {
19 /** A pair (x,y) of pixel coordinates (subpixel resolution). \ingroup
20  * mrpt_base_grp */
22 {
23  /** The type of \a x and \a y */
24  typedef float pixel_coord_t;
25 
26  float x, y;
27 
28  /** Default constructor: undefined values of x,y */
29  TPixelCoordf() : x(), y() {}
30  /** Constructor from x,y values */
31  TPixelCoordf(const float _x, const float _y) : x(_x), y(_y) {}
32 };
33 
34 /** Prints TPixelCoordf as "(x,y)" */
35 std::ostream& operator<<(std::ostream& o, const TPixelCoordf& p);
36 
37 /** A pair (x,y) of pixel coordinates (integer resolution). */
39 {
40  /** The type of \a x and \a y */
41  typedef int pixel_coord_t;
42 
43  TPixelCoord() : x(0), y(0) {}
44  TPixelCoord(const int _x, const int _y) : x(_x), y(_y) {}
45  int x, y;
46 };
47 
48 /** Prints TPixelCoord as "(x,y)" */
49 std::ostream& operator<<(std::ostream& o, const TPixelCoord& p);
50 
51 /** A type for image sizes. */
53 
54 } // end namespace
55 }
56 
57 #endif
A pair (x,y) of pixel coordinates (subpixel resolution).
Definition: TPixelCoord.h:21
A pair (x,y) of pixel coordinates (integer resolution).
Definition: TPixelCoord.h:38
int pixel_coord_t
The type of x and y.
Definition: TPixelCoord.h:41
CStream & operator<<(mrpt::utils::CStream &s, const char *a)
Definition: CStream.cpp:123
TPixelCoordf()
Default constructor: undefined values of x,y.
Definition: TPixelCoord.h:29
TPixelCoordf(const float _x, const float _y)
Constructor from x,y values.
Definition: TPixelCoord.h:31
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
float pixel_coord_t
The type of x and y.
Definition: TPixelCoord.h:24
GLenum GLint GLint y
Definition: glext.h:3538
TPixelCoord TImageSize
A type for image sizes.
Definition: TPixelCoord.h:52
GLenum GLint x
Definition: glext.h:3538
GLfloat GLfloat p
Definition: glext.h:6305
TPixelCoord(const int _x, const int _y)
Definition: TPixelCoord.h:44



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019