47 #ifndef _MIRA_FOOTPRINT_H_ 48 #define _MIRA_FOOTPRINT_H_ 50 #include <serialization/adapters/std/vector> 67 typedef std::vector<Polygon2f> Base;
70 template<
typename Reflector>
81 float rMin = std::numeric_limits<float>::infinity();
84 for(std::size_t i=1; i<polygon.size(); ++i)
86 Line2f l(polygon[i-1], polygon[i]);
87 float d = boost::geometry::distance(
Point2f(0,0), l);
92 if(rMin==std::numeric_limits<float>::infinity())
103 foreach(
const Point2f& p, polygon)
105 float d = p.x()*p.x() + p.y()*p.y();
110 return std::sqrt(rSq);
117 foreach (
const Polygon2f& polygon, *
this) {
118 foreach (
const Point2f& p, polygon) {
129 if(boundingBox.isValid())
131 return boundingBox.height();
#define MIRA_REFLECT_BASE(reflector, BaseClass)
static Rect< float, 2 > invalid()
Point< float, 2 > Point2f
boost::geometry::model::ring< Point2f > Polygon2f