12 #include <mrpt/containers/CDynamicGrid.h> 13 #include <mrpt/math/TPoint3D.h> 14 #include <mrpt/math/TPolygon2D.h> 15 #include <mrpt/opengl/TTriangle.h> 36 const mrpt::math::TPoint2Df& bbMin,
const mrpt::math::TPoint2Df& bbMax,
41 const mrpt::math::TPolygon2D&
getContour()
const;
48 const mrpt::math::TPolygon2D& contour,
const float zMin,
58 mutable std::optional<mrpt::math::TPolygon2D>
contour_;
64 template <
typename... Args>
66 :
mrpt::containers::CDynamicGrid<uint8_t>(
72 float cell2float(
const uint8_t& v)
const override {
return v; }
75 mutable std::optional<SimpleOccGrid>
grid_;
84 const mrpt::math::TPolygon2D& poly)
const;
89 mrpt::math::TPolygon2D
next;
93 size_t i,
const mrpt::math::TPolygon2D& p,
bool allowApproxEdges)
const;
96 const mrpt::math::TPolygon2D& rawGridContour,
97 const std::string& debugStr = {})
const;
std::optional< mrpt::math::TPolygon2D > contour_
std::optional< SimpleOccGrid > grid_
const mrpt::math::TPolygon2D & getContour() const
mrpt::math::TPolygon2D internalPrunePolygon(const mrpt::math::TPolygon2D &poly) const
SimpleOccGrid(Args &&... args)
float cell2float(const uint8_t &v) const override
void internalGridFilterSpurious() const
geometry_msgs::TransformStamped t
void setShapeManual(const mrpt::math::TPolygon2D &contour, const float zMin, const float zMax)
std::optional< RemovalCandidate > lossOfRemovingVertex(size_t i, const mrpt::math::TPolygon2D &p, bool allowApproxEdges) const
void computeShape() const
Computes contour_ from the contents in grid_.
void buildAddPoint(const mrpt::math::TPoint3Df &pt)
mrpt::math::TPolygon2D internalGridContour() const
mrpt::math::TPolygon2D next
void buildAddTriangle(const mrpt::opengl::TTriangle &t)
void mergeWith(const Shape2p5 &s)
void debugSaveGridTo3DSceneFile(const mrpt::math::TPolygon2D &rawGridContour, const std::string &debugStr={}) const
void internalGridFloodFill() const
void buildInit(const mrpt::math::TPoint2Df &bbMin, const mrpt::math::TPoint2Df &bbMax, int numCells=100)