Main MRPT website > C++ reference for MRPT 1.5.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 #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
A pair (x,y) of pixel coordinates (integer resolution).
Definition: TPixelCoord.h:37
int pixel_coord_t
The type of x and y.
Definition: TPixelCoord.h:39
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
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:23
GLenum GLint GLint y
Definition: glext.h:3516
TPixelCoord TImageSize
A type for image sizes.
Definition: TPixelCoord.h:49
GLenum GLint x
Definition: glext.h:3516
GLfloat GLfloat p
Definition: glext.h:5587
TPixelCoord(const int _x, const int _y)
Definition: TPixelCoord.h:42



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020