// ==========================================================================
// $Id: point2d.h,v 1.5 2017/09/23 00:53:23 jlang Exp $
// CSI2372 example Code for lecture 4
// ==========================================================================
// (C)opyright:
//
//   Jochen Lang
//   SITE, University of Ottawa
//   800 King Edward Ave.
//   Ottawa, On., K1N 6N5
//   Canada. 
//   http://www.eecs.uottawa.ca
// 
// Creator: jlang (Jochen Lang)
// Email:   jlang@eecs.uottawa.ca
// ==========================================================================
// $Log: point2d.h,v $
// Revision 1.5  2017/09/23 00:53:23  jlang
// Introduced references and const again for this version
//
// Revision 1.4  2017/09/13 16:21:06  jlang
// Removed arrays, references and use of const.
//
// Revision 1.3  2011/10/16 02:51:42  jlang
// Added files for lecture 06
//
// Revision 1.2  2011/10/03 15:29:33  jlang
// Updates for lecture 3-5
//
// Revision 1.1  2011/09/27 17:22:20  jlang
// Added bounding shape example
//
// Revision 1.1  2010/09/29 14:28:59  jlang
// Separate files for line_segment and point2d. Added test_point and make label test
//
//
// ==========================================================================
#ifndef POINT_2D
#define POINT_2D

class Point2D {
 protected:
  double d_x;
  double d_y;
 public:
  Point2D( double _x=0.0, double _y=0.0 );
  Point2D add( const Point2D& _oPoint ) const;
  Point2D subtract( const Point2D& _oPoint ) const;
  Point2D& minusEquals( const Point2D& _oPoint );
  double dot( const Point2D& _oPoint ) const;
  // Newly added print
  void print() const;
  // Newly added functions for AABox
  Point2D min( const Point2D& _oPoint ) const;
  Point2D max( const Point2D& _oPoint ) const;
  bool isSmaller( const Point2D& _oPoint ) const;
  void isSmaller( const Point2D& _oPoint, bool& xCompare, bool& yCompare ) const;
};
#endif
