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

Method look_up

tools/CGAL/AABBTree2.h:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63
64 void look_up(const Matrix2Fr& points,
65 VectorF& squared_dists,
66 VectorI& closest_segment_indices) {
67 const size_t num_pts = points.rows();
68 squared_dists.resize(num_pts);
69 closest_segment_indices.resize(num_pts);
70
71 for (size_t i=0; i<num_pts; i++) {
72 Point p = to_cgal_point(points.row(i));
73 Point_and_primitive_id itr = m_tree->closest_point_and_primitive(p);
74 closest_segment_indices[i] = itr.second - m_segments.begin();
75 Point p2 = itr.first;
76 squared_dists[i] = (p-p2).squared_length();
77 }
78 }
79
80 void look_up_with_closest_points(const Matrix2Fr& points,
81 VectorF& squared_dists,

Callers 2

compute_metricFunction · 0.95
solve_heat_equationFunction · 0.95

Calls 1

beginMethod · 0.45

Tested by

no test coverage detected