Main MRPT website > C++ reference for MRPT 1.5.6
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 #include <mrpt/base/link_pragmas.h>
15 
16 namespace 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 
A pair (x,y) of pixel coordinates (subpixel resolution).
Definition: TPixelCoord.h:21
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1166
A pair (x,y) of pixel coordinates (integer resolution).
Definition: TPixelCoord.h:37
GLint GLint GLint GLint GLint x
Definition: glew.h:1166
int pixel_coord_t
The type of x and y.
Definition: TPixelCoord.h:39
GLfloat GLfloat p
Definition: glew.h:10113
CStream BASE_IMPEXP & operator<<(mrpt::utils::CStream &s, const char *a)
Definition: CStream.cpp:130
TPixelCoordf()
Default constructor: undefined values of x,y.
Definition: TPixelCoord.h:28
TPixelCoordf(const float _x, const float _y)
Constructor from x,y values.
Definition: TPixelCoord.h:31
float pixel_coord_t
The type of x and y.
Definition: TPixelCoord.h:23
TPixelCoord TImageSize
A type for image sizes.
Definition: TPixelCoord.h:49
TPixelCoord(const int _x, const int _y)
Definition: TPixelCoord.h:42



Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018