MeshLib C++ Docs
Loading...
Searching...
No Matches

Collection of functions and structures needed for PointCloud triangulation. More...

Classes

struct  MR::TriangulationHelpers::TriangulatedFanData
 Data with caches for optimizing fan triangulation. More...

Functions

float MR::TriangulationHelpers::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.
void MR::TriangulationHelpers::findNeighborsInBall (const PointCloud &pointCloud, VertId v, float radius, std::vector< VertId > &neighbors)
 Finds all neighbors of v in given radius (v excluded)
float MR::TriangulationHelpers::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)
void MR::TriangulationHelpers::filterNeighbors (const VertNormals &orientedNormals, const VertBitSet *untrustedNormals, VertId v, std::vector< VertId > &neighbors)
 Filter neighbors with crossing normals.
bool MR::TriangulationHelpers::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.

Detailed Description

Collection of functions and structures needed for PointCloud triangulation.

Function Documentation

◆ filterNeighbors()

void MR::TriangulationHelpers::filterNeighbors ( const VertNormals & orientedNormals,
const VertBitSet * untrustedNormals,
VertId v,
std::vector< VertId > & neighbors )

#include <MRMesh/MRPointCloudTriangulationHelpers.h>

Filter neighbors with crossing normals.

◆ findNeighborsInBall()

void MR::TriangulationHelpers::findNeighborsInBall ( const PointCloud & pointCloud,
VertId v,
float radius,
std::vector< VertId > & neighbors )

#include <MRMesh/MRPointCloudTriangulationHelpers.h>

Finds all neighbors of v in given radius (v excluded)

◆ findNumNeighbors()

float MR::TriangulationHelpers::findNumNeighbors ( const PointCloud & pointCloud,
VertId v,
int numNeis,
std::vector< VertId > & neighbors,
FewSmallest< PointsProjectionResult > & tmp,
float upDistLimitSq = FLT_MAX )

#include <MRMesh/MRPointCloudTriangulationHelpers.h>

Finds at most given number of neighbors of v (v excluded)

Parameters
tmptemporary storage to avoid its allocation
upDistLimitSqupper limit on the distance in question, points with larger distance than it will not be returned
Returns
maxDistSq to the furthest returned neighbor (or 0 if no neighbours are returned)

◆ isBoundaryPoint()

bool MR::TriangulationHelpers::isBoundaryPoint ( const PointCloud & cloud,
VertId v,
const Settings & settings,
TriangulatedFanData & fanData )
nodiscard

#include <MRMesh/MRPointCloudTriangulationHelpers.h>

Checks if given vertex is on boundary of the point cloud, by constructing local triangulation around it.

Parameters
cloudinput point cloud
vvertex id to check
settingsall parameters of the computation
fanDatacache structure for neighbors, not to allocate for multiple calls
Returns
true if vertex is boundary, false otherwise

◆ updateNeighborsRadius()

float MR::TriangulationHelpers::updateNeighborsRadius ( const VertCoords & points,
VertId v,
VertId boundaryV,
const std::vector< VertId > & fan,
float baseRadius )

#include <MRMesh/MRPointCloudTriangulationHelpers.h>

Finds max radius of neighbors search, for possible better local triangulation.

Parameters
borderVfirst boundary vertex in
fan(next VertId in fan is also boundary but first is enough)