#include <Shape2p5.h>
Classes | |
| struct | RemovalCandidate |
| class | SimpleOccGrid |
Public Member Functions | |
| std::string | asString () const |
| void | buildAddPoint (const mrpt::math::TPoint3Df &pt) |
| void | buildAddTriangle (const mrpt::opengl::TTriangle &t) |
| void | buildInit (const mrpt::math::TPoint2Df &bbMin, const mrpt::math::TPoint2Df &bbMax, int numCells=100) |
| void | clipZMax (float v) |
| void | clipZMin (float v) |
| const mrpt::math::TPolygon2D & | getContour () const |
| void | mergeWith (const Shape2p5 &s) |
| void | setShapeManual (const mrpt::math::TPolygon2D &contour, const float zMin, const float zMax) |
| Shape2p5 ()=default | |
| double | volume () const |
| float | zMax () const |
| float | zMin () const |
Private Member Functions | |
| void | computeShape () const |
| Computes contour_ from the contents in grid_. More... | |
| void | debugSaveGridTo3DSceneFile (const mrpt::math::TPolygon2D &rawGridContour, const std::string &debugStr={}) const |
| mrpt::math::TPolygon2D | internalGridContour () const |
| void | internalGridFilterSpurious () const |
| void | internalGridFloodFill () const |
| mrpt::math::TPolygon2D | internalPrunePolygon (const mrpt::math::TPolygon2D &poly) const |
| std::optional< RemovalCandidate > | lossOfRemovingVertex (size_t i, const mrpt::math::TPolygon2D &p, bool allowApproxEdges) const |
Private Attributes | |
| std::optional< mrpt::math::TPolygon2D > | contour_ |
| std::optional< SimpleOccGrid > | grid_ |
| float | zMax_ = 0 |
| float | zMin_ = 0 |
A "2.5" shape: a 2D polygon + a [zMin,zMax] height range
The actual 2.5 shape is evaluated the first time getContour() is called, given all former calls to buildAddPoint() or buildAddTriangle() and a ray-tracing algorithm.
Definition at line 31 of file Shape2p5.h.
|
default |
| std::string Shape2p5::asString | ( | ) | const |
Definition at line 635 of file Shape2p5.cpp.
| void Shape2p5::buildAddPoint | ( | const mrpt::math::TPoint3Df & | pt | ) |
Definition at line 126 of file Shape2p5.cpp.
| void Shape2p5::buildAddTriangle | ( | const mrpt::opengl::TTriangle & | t | ) |
Definition at line 135 of file Shape2p5.cpp.
| void Shape2p5::buildInit | ( | const mrpt::math::TPoint2Df & | bbMin, |
| const mrpt::math::TPoint2Df & | bbMax, | ||
| int | numCells = 100 |
||
| ) |
Definition at line 106 of file Shape2p5.cpp.
| void Shape2p5::clipZMax | ( | float | v | ) |
Definition at line 630 of file Shape2p5.cpp.
| void Shape2p5::clipZMin | ( | float | v | ) |
Definition at line 625 of file Shape2p5.cpp.
|
private |
Computes contour_ from the contents in grid_.
Definition at line 169 of file Shape2p5.cpp.
|
private |
Definition at line 498 of file Shape2p5.cpp.
| const mrpt::math::TPolygon2D & Shape2p5::getContour | ( | ) | const |
Definition at line 95 of file Shape2p5.cpp.
|
private |
Definition at line 366 of file Shape2p5.cpp.
|
private |
Definition at line 226 of file Shape2p5.cpp.
|
private |
Definition at line 255 of file Shape2p5.cpp.
|
private |
Definition at line 589 of file Shape2p5.cpp.
|
private |
Definition at line 547 of file Shape2p5.cpp.
Definition at line 48 of file Shape2p5.cpp.
| void Shape2p5::setShapeManual | ( | const mrpt::math::TPolygon2D & | contour, |
| const float | zMin, | ||
| const float | zMax | ||
| ) |
Definition at line 217 of file Shape2p5.cpp.
| double Shape2p5::volume | ( | ) | const |
Definition at line 43 of file Shape2p5.cpp.
|
inline |
Definition at line 50 of file Shape2p5.h.
|
inline |
Definition at line 49 of file Shape2p5.h.
|
mutableprivate |
Definition at line 58 of file Shape2p5.h.
|
mutableprivate |
Definition at line 74 of file Shape2p5.h.
|
private |
Definition at line 59 of file Shape2p5.h.
|
mutableprivate |
Definition at line 59 of file Shape2p5.h.