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

Function commonEdge

source/MRMesh/MRReducePath.cpp:66–76  ·  view source on GitHub ↗

finds an edge originated from v, which is located in the same triangle as p

Source from the content-addressed store, hash-verified

64
65// finds an edge originated from v, which is located in the same triangle as p
66static EdgeId commonEdge( const MeshTopology & topology, VertId v, const MeshTriPoint & p )
67{
68 for ( EdgeId e : orgRing( topology, v ) )
69 {
70 MeshTriPoint mtp0( p );
71 MeshTriPoint mtp1( e, { 0.5f, 0.0f } );
72 if ( fromSameTriangle( topology, mtp0, mtp1 ) )
73 return e;
74 }
75 return {};
76}
77
78// finds an edge originated from v, which is located in the same triangle as p, and next edge does not satisfy this property
79static EdgeId lastCommonEdge( const MeshTopology & topology, VertId v, const MeshTriPoint & p )

Callers 2

lastCommonEdgeFunction · 0.85
firstCommonEdgeFunction · 0.85

Calls 2

orgRingFunction · 0.85
fromSameTriangleFunction · 0.70

Tested by

no test coverage detected