makes edge path connecting all points, but not the first with the last
| 37 | |
| 38 | // makes edge path connecting all points, but not the first with the last |
| 39 | EdgePath 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 | |
| 56 | Mesh Mesh::fromTriangles( |