MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / split

Function split

tools/MeshUtils/EdgeSplitter.cpp:16–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15namespace EdgeSplitterHelper {
16 void split(std::list<VectorF>& end_points,
17 std::list<VectorF>::iterator begin_itr,
18 Float length, Float threshold) {
19 if (length < threshold) return;
20
21 auto end_itr = std::next(begin_itr);
22 assert(end_itr != end_points.end());
23 const auto& v1 = *begin_itr;
24 const auto& v2 = *end_itr;
25 VectorF mid = 0.5 * (v1 + v2);
26 Float half_length = length * 0.5;
27 auto mid_itr = end_points.insert(end_itr, mid);
28
29 split(end_points, begin_itr, half_length, threshold);
30 split(end_points, mid_itr, half_length, threshold);
31 }
32
33 size_t get_opposite_vertex_index(const Eigen::Ref<VectorI>& f,
34 size_t vi, size_t vj) {

Callers 1

split_edgeMethod · 0.70

Calls 3

nextFunction · 0.85
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected