Interface TriangleKdTree

All Superinterfaces:
KdTree, Serializable
All Known Implementing Classes:
TriangleKdTreeImpl

public interface TriangleKdTree extends KdTree
!!!EXPERIMENTAL!!! Kd-tree storing triangles. Used in precise surface distance search.
  • Method Details

    • create

      static TriangleKdTree create(List<MeshTriangle> triangles)
      Constructor.
      Parameters:
      triangles - List of MeshTriangle from which the KdTree is built.
      Returns:
      TriangleKdTree
    • create

      static TriangleKdTree create(Collection<MeshFacet> facets)
      Constructor.
      Parameters:
      facets - Collection of MeshFacet 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

      TriangleKdNode getClosestLeaf(javax.vecmath.Point3d point)
      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

      TriangleKdNode getLeafFromNode(javax.vecmath.Point3d point, TriangleKdNode rootNode)
      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.