MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / computeSpaceDistances

Function computeSpaceDistances

source/MRMesh/MREnumNeighbours.cpp:72–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72VertScalars computeSpaceDistances( const Mesh& mesh, const PointOnFace & start, float range )
73{
74 MR_TIMER;
75
76 VertScalars res( mesh.topology.vertSize(), FLT_MAX );
77 EnumNeihbourVertices e;
78 e.run( mesh.topology, mesh.getClosestVertex( start ), [&]( VertId v )
79 {
80 const auto dist = ( start.point - mesh.points[v] ).length();
81 res[v] = dist;
82 return dist <= range;
83 } );
84
85 return res;
86}
87
88VertBitSet findNeighborVerts( const Mesh& mesh, const PointOnFace& start, float rangeSq )
89{

Callers

nothing calls this directly

Calls 4

vertSizeMethod · 0.45
runMethod · 0.45
getClosestVertexMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected