MeshLib Documentation
Loading...
Searching...
No Matches
MR::TriangulationHelpers Namespace Reference

Classes

struct  FanOptimizerQueueElement
 
struct  Settings
 
struct  TriangulatedFanData
 Data with caches for optimizing fan triangulation. More...
 

Functions

MRMESH_API float updateNeighborsRadius (const VertCoords &points, VertId v, VertId boundaryV, const std::vector< VertId > &fan, float baseRadius)
 Finds max radius of neighbors search, for possible better local triangulation.
 
MRMESH_API void findNeighborsInBall (const PointCloud &pointCloud, VertId v, float radius, std::vector< VertId > &neighbors)
 Finds all neighbors of v in given radius (v excluded)
 
MRMESH_API float findNumNeighbors (const PointCloud &pointCloud, VertId v, int numNeis, std::vector< VertId > &neighbors, FewSmallest< PointsProjectionResult > &tmp, float upDistLimitSq=FLT_MAX)
 Finds at most given number of neighbors of v (v excluded)
 
MRMESH_API void filterNeighbors (const VertNormals &normals, VertId v, std::vector< VertId > &neighbors)
 Filter neighbors with crossing normals.
 
MRMESH_API void buildLocalTriangulation (const PointCloud &cloud, VertId v, const Settings &settings, TriangulatedFanData &fanData)
 constructs local triangulation around given point
 
MRMESH_API std::optional< std::vector< SomeLocalTriangulations > > buildLocalTriangulations (const PointCloud &cloud, const Settings &settings, const ProgressCallback &progress={})
 
MRMESH_API std::optional< AllLocalTriangulationsbuildUnitedLocalTriangulations (const PointCloud &cloud, const Settings &settings, const ProgressCallback &progress={})
 
MRMESH_API bool isBoundaryPoint (const PointCloud &cloud, VertId v, const Settings &settings, TriangulatedFanData &fanData)
 Checks if given vertex is on boundary of the point cloud, by constructing local triangulation around it.
 
MRMESH_API std::optional< VertBitSet > findBoundaryPoints (const PointCloud &pointCloud, const Settings &settings, ProgressCallback cb={})
 Returns bit set of points that are considered as boundary by calling isBoundaryPoint in each.
 

Function Documentation

◆ buildLocalTriangulation()

MRMESH_API void MR::TriangulationHelpers::buildLocalTriangulation ( const PointCloud & cloud,
VertId v,
const Settings & settings,
TriangulatedFanData & fanData )

constructs local triangulation around given point

◆ buildLocalTriangulations()

MRMESH_API std::optional< std::vector< SomeLocalTriangulations > > MR::TriangulationHelpers::buildLocalTriangulations ( const PointCloud & cloud,
const Settings & settings,
const ProgressCallback & progress = {} )
nodiscard

computes all local triangulations of all points in the cloud, and returns them distributed among a set of SomeLocalTriangulations objects

◆ buildUnitedLocalTriangulations()

MRMESH_API std::optional< AllLocalTriangulations > MR::TriangulationHelpers::buildUnitedLocalTriangulations ( const PointCloud & cloud,
const Settings & settings,
const ProgressCallback & progress = {} )
nodiscard

◆ findBoundaryPoints()

MRMESH_API std::optional< VertBitSet > MR::TriangulationHelpers::findBoundaryPoints ( const PointCloud & pointCloud,
const Settings & settings,
ProgressCallback cb = {} )
nodiscard

Returns bit set of points that are considered as boundary by calling isBoundaryPoint in each.