Interface BSPTreeVisitor<P extends Point<P>,N extends BSPTree.Node<P,N>>

Type Parameters:
P - Point implementation type
N - BSP tree node implementation type
All Known Implementing Classes:
AbstractRegionBSPTree.BoundaryProjector, BSPTreePrinter, BSPTreeVisitor.ClosestFirstVisitor, BSPTreeVisitor.FarthestFirstVisitor, BSPTreeVisitor.TargetPointVisitor, RegionBSPTree1D.BoundaryProjector1D, RegionBSPTree1S.BoundaryProjector1S, RegionBSPTree2D.BoundaryProjector2D, RegionBSPTree2D.LinecastVisitor, RegionBSPTree2S.BoundaryProjector2S, RegionBSPTree3D.BoundaryProjector3D, RegionBSPTree3D.LinecastVisitor, RegionBSPTree3D.RegionSizePropertiesVisitor
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BSPTreeVisitor<P extends Point<P>,N extends BSPTree.Node<P,N>>
Interface for visiting the nodes in a BSPTree or BSPSubtree.
  • Method Details

    • visit

      BSPTreeVisitor.Result visit(N node)
      Visit a node in a BSP tree. This method is called for both internal nodes and leaf nodes.
      Parameters:
      node - the node being visited
      Returns:
      the result of the visit operation
    • visitOrder

      default BSPTreeVisitor.Order visitOrder(N internalNode)
      Determine the visit order for the given internal node. This is called for each internal node before visit(BSPTree.Node) is called. Returning null or BSPTreeVisitor.Order.NONEfrom this method skips the subtree rooted at the given node. This method is not called on leaf nodes.
      Parameters:
      internalNode - the internal node to determine the visit order for
      Returns:
      the order that the subtree rooted at the given node should be visited