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

Method AABBTree

tools/CGAL/AABBTree.h:34–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33 public:
34 AABBTree(const MatrixFr& vertices, const MatrixIr& faces) {
35 assert(faces.cols() == 3);
36 m_dim = vertices.cols();
37
38 const size_t num_faces = faces.rows();
39 for (size_t i=0; i<num_faces; i++) {
40 const Vector3I& f = faces.row(i);
41 m_triangles.emplace_back(
42 to_cgal_point(vertices.row(f[0])),
43 to_cgal_point(vertices.row(f[1])),
44 to_cgal_point(vertices.row(f[2])));
45 }
46
47 m_tree = std::make_shared<Tree>(m_triangles.begin(), m_triangles.end());
48 m_tree->accelerate_distance_queries();
49 }
50
51 public:
52 /**

Callers 3

load_dataMethod · 0.80
load_meshMethod · 0.80
carve_meshFunction · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected