Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Point.h
Go to the documentation of this file.
1 
11 #ifndef __KOME_CORE_POINT_H__
12 #define __KOME_CORE_POINT_H__
13 
14 namespace kome {
15  namespace core {
16 
21  template < typename T > class Point {
22  public:
27  Point() : px(), py() {
28  }
29 
36  Point( T x, T y ) : px( x ), py( y ) {
37  }
38 
43  virtual ~Point() {
44  }
45 
46  public:
48  T px;
50  T py;
51 
52  public:
60  static bool lessX( const Point< T >& p0, const Point< T >& p1 ) {
61  return ( p0.px < p1.px );
62  }
63 
71  static bool greaterX( const Point< T >& p0, const Point< T >& p1 ) {
72  return ( p0.px > p1.px );
73  }
74 
82  static bool lessY( const Point< T >& p0, const Point< T >& p1 ) {
83  return ( p0.py < p1.py );
84  }
85 
93  static bool greaterY( const Point< T >& p0, const Point< T >& p1 ) {
94  return ( p0.py > p1.py );
95  }
96  };
97  }
98 }
99 
100 #endif // __KOME_CORE_POINT_H__
virtual ~Point()
destructor
Definition: Point.h:43
static bool lessY(const Point< T > &p0, const Point< T > &p1)
compare to sort
Definition: Point.h:82
Point()
constructor
Definition: Point.h:27
static bool greaterX(const Point< T > &p0, const Point< T > &p1)
compare to sort
Definition: Point.h:71
static bool lessX(const Point< T > &p0, const Point< T > &p1)
compare to sort
Definition: Point.h:60
static bool greaterY(const Point< T > &p0, const Point< T > &p1)
compare to sort
Definition: Point.h:93
Point(T x, T y)
constructor
Definition: Point.h:36
2 dimensional point information management class
Definition: Point.h:21