Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
mvsim::Shape2p5 Class Reference

#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< RemovalCandidatelossOfRemovingVertex (size_t i, const mrpt::math::TPolygon2D &p, bool allowApproxEdges) const
 

Private Attributes

std::optional< mrpt::math::TPolygon2D > contour_
 
std::optional< SimpleOccGridgrid_
 
float zMax_ = 0
 
float zMin_ = 0
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Shape2p5()

mvsim::Shape2p5::Shape2p5 ( )
default

Member Function Documentation

◆ buildAddPoint()

void Shape2p5::buildAddPoint ( const mrpt::math::TPoint3Df &  pt)

Definition at line 127 of file Shape2p5.cpp.

◆ buildAddTriangle()

void Shape2p5::buildAddTriangle ( const mrpt::opengl::TTriangle &  t)

Definition at line 136 of file Shape2p5.cpp.

◆ buildInit()

void Shape2p5::buildInit ( const mrpt::math::TPoint2Df &  bbMin,
const mrpt::math::TPoint2Df &  bbMax,
int  numCells = 100 
)

Definition at line 106 of file Shape2p5.cpp.

◆ clipZMax()

void Shape2p5::clipZMax ( float  v)

Definition at line 643 of file Shape2p5.cpp.

◆ clipZMin()

void Shape2p5::clipZMin ( float  v)

Definition at line 638 of file Shape2p5.cpp.

◆ computeShape()

void Shape2p5::computeShape ( ) const
private

Computes contour_ from the contents in grid_.

Definition at line 170 of file Shape2p5.cpp.

◆ debugSaveGridTo3DSceneFile()

void Shape2p5::debugSaveGridTo3DSceneFile ( const mrpt::math::TPolygon2D &  rawGridContour,
const std::string &  debugStr = {} 
) const
private

Definition at line 504 of file Shape2p5.cpp.

◆ getContour()

const mrpt::math::TPolygon2D & Shape2p5::getContour ( ) const

Definition at line 95 of file Shape2p5.cpp.

◆ internalGridContour()

mrpt::math::TPolygon2D Shape2p5::internalGridContour ( ) const
private

Definition at line 366 of file Shape2p5.cpp.

◆ internalGridFilterSpurious()

void Shape2p5::internalGridFilterSpurious ( ) const
private

Definition at line 228 of file Shape2p5.cpp.

◆ internalGridFloodFill()

void Shape2p5::internalGridFloodFill ( ) const
private

Definition at line 258 of file Shape2p5.cpp.

◆ internalPrunePolygon()

mrpt::math::TPolygon2D Shape2p5::internalPrunePolygon ( const mrpt::math::TPolygon2D &  poly) const
private

Definition at line 599 of file Shape2p5.cpp.

◆ lossOfRemovingVertex()

std::optional< Shape2p5::RemovalCandidate > Shape2p5::lossOfRemovingVertex ( size_t  i,
const mrpt::math::TPolygon2D &  p,
bool  allowApproxEdges 
) const
private

Definition at line 556 of file Shape2p5.cpp.

◆ mergeWith()

void Shape2p5::mergeWith ( const Shape2p5 s)

Definition at line 48 of file Shape2p5.cpp.

◆ setShapeManual()

void Shape2p5::setShapeManual ( const mrpt::math::TPolygon2D &  contour,
const float  zMin,
const float  zMax 
)

Definition at line 219 of file Shape2p5.cpp.

◆ volume()

double Shape2p5::volume ( ) const

Definition at line 42 of file Shape2p5.cpp.

◆ zMax()

float mvsim::Shape2p5::zMax ( ) const
inline

Definition at line 52 of file Shape2p5.h.

◆ zMin()

float mvsim::Shape2p5::zMin ( ) const
inline

Definition at line 51 of file Shape2p5.h.

Member Data Documentation

◆ contour_

std::optional<mrpt::math::TPolygon2D> mvsim::Shape2p5::contour_
mutableprivate

Definition at line 58 of file Shape2p5.h.

◆ grid_

std::optional<SimpleOccGrid> mvsim::Shape2p5::grid_
mutableprivate

Definition at line 75 of file Shape2p5.h.

◆ zMax_

float mvsim::Shape2p5::zMax_ = 0
mutableprivate

Definition at line 59 of file Shape2p5.h.

◆ zMin_

float mvsim::Shape2p5::zMin_ = 0
mutableprivate

Definition at line 59 of file Shape2p5.h.


The documentation for this class was generated from the following files:


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:23