test_minimal_rectangle.cpp
Go to the documentation of this file.
00001 
00063 #include <cob_3d_mapping_common/minimal_rectangle_2d.h>
00064 #include <iostream>
00065 
00066 typedef Eigen::Vector2f Vec;
00067 
00068 int main(int argc, char** argv)
00069 {
00070   std::vector<Vec> pts;
00071   pts.push_back(Vec(-10,-5));
00072   pts.push_back(Vec(-8,-3));
00073   pts.push_back(Vec(-5,-2));
00074 
00075   pts.push_back(Vec(-3,-5));
00076   pts.push_back(Vec(-5,-8));
00077   pts.push_back(Vec(-8,-7));
00078 
00079   Vec p1, p2, p3;
00080   cob_3d_mapping::MinimalRectangle2D mr;
00081   mr.setConvexHullList(pts);
00082   mr.rotatingCalipers(p2,p1,p3);
00083 
00084   std::cout << "Origin:\n" << p2 << std::endl;
00085   std::cout << "ccw:\n" << p1 << std::endl;
00086   std::cout << "cw:\n" << p3 << std::endl;
00087 }


cob_3d_mapping_common
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:02:19