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

Function sMakeEdgePath

source/MRMesh/MRMesh.cpp:39–53  ·  view source on GitHub ↗

makes edge path connecting all points, but not the first with the last

Source from the content-addressed store, hash-verified

37
38// makes edge path connecting all points, but not the first with the last
39EdgePath sMakeEdgePath( Mesh& mesh, const std::vector<Vector3f>& contourPoints )
40{
41 EdgePath newEdges( contourPoints.size() );
42 for ( int i = 0; i < contourPoints.size(); ++i )
43 {
44 auto newVert = mesh.addPoint( contourPoints[i] );
45 newEdges[i] = mesh.topology.makeEdge();
46 mesh.topology.setOrg( newEdges[i], newVert );
47 }
48 for ( int i = 0; i + 1 < newEdges.size(); ++i )
49 {
50 mesh.topology.splice( newEdges[i + 1], newEdges[i].sym() );
51 }
52 return newEdges;
53}
54}
55
56Mesh Mesh::fromTriangles(

Callers 2

addSeparateEdgeLoopMethod · 0.85
attachEdgeLoopPartMethod · 0.85

Calls 6

sizeMethod · 0.45
addPointMethod · 0.45
makeEdgeMethod · 0.45
setOrgMethod · 0.45
spliceMethod · 0.45
symMethod · 0.45

Tested by

no test coverage detected