47 #ifndef _MIRA_FOOTPRINT_H_ 48 #define _MIRA_FOOTPRINT_H_ 51 #include <serialization/adapters/std/vector> 58 #include <boost/geometry/strategies/strategies.hpp> 59 #include <boost/geometry/algorithms/distance.hpp> 72 typedef std::vector<Polygon2f> Base;
75 template<
typename Reflector>
86 float rMin = std::numeric_limits<float>::infinity();
89 for(std::size_t i=1; i<polygon.size(); ++i)
91 Line2f l(polygon[i-1], polygon[i]);
92 float d = boost::geometry::distance(
Point2f(0,0), l);
97 if(rMin==std::numeric_limits<float>::infinity())
108 foreach(
const Point2f& p, polygon)
110 float d = p.x()*p.x() + p.y()*p.y();
115 return std::sqrt(rSq);
122 foreach (
const Polygon2f& polygon, *
this) {
123 foreach (
const Point2f& p, polygon) {
134 if(boundingBox.isValid())
136 return boundingBox.height();
#define MIRA_REFLECT_BASE(reflector, BaseClass)
static Rect< float, 2 > invalid()
Point< float, 2 > Point2f
boost::geometry::model::ring< Point2f > Polygon2f