Package cz.fidentis.analyst.data.kdtree
Interface TriangleKdTree
- All Superinterfaces:
KdTree
,Serializable
- All Known Implementing Classes:
TriangleKdTreeImpl
!!!EXPERIMENTAL!!!
Kd-tree storing triangles. Used in precise surface distance search.
-
Method Summary
Modifier and TypeMethodDescriptionstatic TriangleKdTree
create
(Collection<MeshFacet> facets) Constructor.static TriangleKdTree
create
(List<MeshTriangle> triangles) Constructor.getClosestLeaf
(javax.vecmath.Point3d point) Traverses tree to the leaf which is closest to a point.getLeafFromNode
(javax.vecmath.Point3d point, TriangleKdNode rootNode) Traverses tree to the leaf which is closest to a point.int
Getter for maximum leaf size.
-
Method Details
-
create
Constructor.- Parameters:
triangles
- List ofMeshTriangle
from which the KdTree is built.- Returns:
TriangleKdTree
-
create
Constructor.- Parameters:
facets
- Collection ofMeshFacet
from which triangles the KdTree is built.- Returns:
TriangleKdTree
-
getLeafSize
int getLeafSize()Getter for maximum leaf size. Used for the size of work-group on GPU.- Returns:
- Maximum leaf size.
-
getClosestLeaf
Traverses tree to the leaf which is closest to a point.- Parameters:
point
- Point to which to find the closest leaf.- Returns:
- Leaf node.
-
getLeafFromNode
Traverses tree to the leaf which is closest to a point. Starting at rootNode.- Parameters:
point
- Point to which to find the closest leaf.rootNode
- Node from which to start traversal.- Returns:
- Leaf node.
-