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

Function classifyShellVert

source/MRMesh/MRInnerShell.cpp:13–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11{
12
13ShellVertexInfo classifyShellVert( const MeshPart & mp, const Vector3f & shellPoint, const FindInnerShellSettings & settings )
14{
15 ShellVertexInfo res;
16
17 MeshProjectionResult projRes;
18 if ( !settings.useWindingNumber || settings.maxDistSq < FLT_MAX )
19 {
20 projRes = findProjection( shellPoint, mp, settings.maxDistSq );
21 if ( !( projRes.distSq < settings.maxDistSq ) )
22 return res;
23 }
24 res.inRange = true;
25
26 if ( settings.useWindingNumber )
27 {
28 const bool outside = mp.mesh.isOutside( shellPoint, settings.windingNumberThreshold );
29 res.rightSide = outside == ( settings.side == Side::Positive );
30 return res;
31 }
32
33 res.projOnBd = projRes.mtp.isBd( mp.mesh.topology, mp.region );
34
35 const bool outside = mp.mesh.isOutsideByProjNorm( shellPoint, projRes, mp.region );
36 res.rightSide = outside == ( settings.side == Side::Positive );
37 return res;
38}
39
40VertBitSet findInnerShellVerts( const MeshPart & mp, const Mesh & shell, const FindInnerShellSettings & settings )
41{

Callers 2

findInnerShellVertsFunction · 0.85

Calls 4

findProjectionFunction · 0.85
isOutsideMethod · 0.80
isOutsideByProjNormMethod · 0.80
isBdMethod · 0.45

Tested by

no test coverage detected