// ========================================================================== // $Id: fitting.cpp,v 1.2 2017/09/13 16:09:27 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.2 2017/09/13 16:09:27 jlang // Wrapped point array in std::array. Removed use of pointers. // // Revision 1.1 2011/09/27 17:22:21 jlang // Added bounding shape example // // // ========================================================================== #include #include "point2d.h" #include "aa_box.h" using std::cout; using std::endl; int main() { // Specify some boundary points to enclose std::array bp{{{-1,2},{4,-3},{5,6},{4,7}}}; AABox bb; if ( bb.enclose( bp ) ) { cout << bb.d_lowerLeft.d_x << " " << bb.d_lowerLeft.d_y << endl; cout << bb.d_upperRight.d_x << " " << bb.d_upperRight.d_y << endl; } return 0; }