Interface KdNode

All Superinterfaces:
Serializable
All Known Implementing Classes:
KdNodeImpl

public interface KdNode extends Serializable
A single node of a KD-tree. Sharing vertices across meshes is supported (the node links all faces that share the same vertex).
  • Method Details

    • getDepth

      int getDepth()
      Returns depth of the node in the tree.
      Returns:
      depth of the node in the tree.
    • getLocation

      javax.vecmath.Point3d getLocation()
      Returns 3D location of vertices stored in this node
      Returns:
      3D location of vertices stored in this node
    • getLesser

      KdNode getLesser()
      Tree traversal - go to the "lesser" child.
      Returns:
      lesser node, null if current node is leaf
    • getGreater

      KdNode getGreater()
      Tree traversal - go to the "grater" child.
      Returns:
      greater node, null if current node is leaf
    • setLesser

      KdNode setLesser(KdNode lesser)
      Set lesser node.
      Parameters:
      lesser - Node to be set as lesser
      Returns:
      current node
    • setGreater

      KdNode setGreater(KdNode greater)
      Set lesser node.
      Parameters:
      greater - Node to be set as greater
      Returns:
      current node
    • getFacets

      Map<MeshFacet,Integer> getFacets()
      Returns a map of all mesh facets that share the stored vertex. Value in the map contains the index which the vertex is stored in the mesh facet.
      Returns:
      Map of facets sharing the stored mesh vertex