// ==========================================================================
// $Id: fitting.cpp,v 1.3 2017/09/13 16:21:06 jlang Exp $
// CSI2372 example Code for lecture 4
// ==========================================================================
// (C)opyright:
//
//   Jochen Lang
//   EECS, 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: fitting.cpp,v $
// Revision 1.3  2017/09/13 16:21:06  jlang
// Removed arrays, references and use of const.
//
// Revision 1.2  2014/09/16 22:05:53  jlang
// Added some brace initialization.
//
// Revision 1.1  2011/09/27 17:22:20  jlang
// Added bounding shape example
//
//
// ==========================================================================
#include <array>

#include <iostream>
#include "point2d.h"
#include "aa_box.h"

using std::cout;
using std::endl;

int main() {
  // Specify some boundary points to enclose
  std::array<Point2D,4> bp{{{-1,2},{4,-3},{5,6},{4,7}}};

  // AABox bb(Point2D(0,0),Point2D(0,0));
  AABox bb{{0,0},{0,0}};
  
  cout << "Points: " << endl;
  for ( auto pt : bp ) {
    pt.print();
    cout << endl;
  }

  if ( bb.enclose( bp ) ) {
    bb.print();
    cout << endl;
  } else {
    cout << "Could not bound points!" << endl;
  }
  return 0;
}
