#include <Shape2p5.h>
Classes | |
| struct | RemovalCandidate |
| class | SimpleOccGrid |
Public Member Functions | |
| 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 30 of file Shape2p5.h.
|
default |
| void Shape2p5::buildAddPoint | ( | const mrpt::math::TPoint3Df & | pt | ) |
Definition at line 127 of file Shape2p5.cpp.
| void Shape2p5::buildAddTriangle | ( | const mrpt::opengl::TTriangle & | t | ) |
Definition at line 136 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 643 of file Shape2p5.cpp.
| void Shape2p5::clipZMin | ( | float | v | ) |
Definition at line 638 of file Shape2p5.cpp.
|
private |
Computes contour_ from the contents in grid_.
Definition at line 170 of file Shape2p5.cpp.
|
private |
Definition at line 504 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 228 of file Shape2p5.cpp.
|
private |
Definition at line 258 of file Shape2p5.cpp.
|
private |
Definition at line 599 of file Shape2p5.cpp.
|
private |
Definition at line 556 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 219 of file Shape2p5.cpp.
| double Shape2p5::volume | ( | ) | const |
Definition at line 42 of file Shape2p5.cpp.
|
inline |
Definition at line 52 of file Shape2p5.h.
|
inline |
Definition at line 51 of file Shape2p5.h.
|
mutableprivate |
Definition at line 58 of file Shape2p5.h.
|
mutableprivate |
Definition at line 75 of file Shape2p5.h.
|
mutableprivate |
Definition at line 59 of file Shape2p5.h.
|
mutableprivate |
Definition at line 59 of file Shape2p5.h.