5#include <boost/geometry/algorithms/centroid.hpp>
6#include <boost/geometry/algorithms/detail/envelope/interface.hpp>
7#include <boost/geometry/algorithms/detail/within/interface.hpp>
8#include <boost/geometry/geometries/box.hpp>
17 Room::isInside(
const Eigen::Vector3f& point,
const bool restrictTo2dCheck)
const
22 const bool isInsideXY = boost::geometry::within(pt, poly);
24 if (restrictTo2dCheck)
30 return isInsideXY and isInsideZ;
39 boost::geometry::centroid(poly,
center);
44 std::tuple<Eigen::Vector2f, Eigen::Vector2f>
48 boost::geometry::model::box<util::geometry::point_type> box;
50 boost::geometry::envelope(poly, box);
62 return boost::geometry::within(pt, poly);
This file is part of ArmarX.
std::vector< Eigen::Vector2f > to2D(const std::vector< Eigen::Vector3f > &v)
Eigen::Vector2f fromPoint(const point_type &pt)
boost::geometry::model::d2::point_xy< float > point_type
point_type toPoint(const Eigen::Vector2f &pt)
polygon_type toPolygon(const std::vector< Eigen::Vector2f > &hull)
boost::geometry::model::polygon< point_type > polygon_type
bool isInside(const Eigen::Vector3f &point, bool restrictTo2dCheck=false) const
std::vector< Eigen::Vector2f > polygon
std::tuple< Eigen::Vector2f, Eigen::Vector2f > aabb() const
Eigen::Vector2f center() const