Class ClosestNodesImpl

java.lang.Object
cz.fidentis.analyst.engines.point2surface.impl.ClosestNodesImpl
All Implemented Interfaces:
KdTreeVisitor

public class ClosestNodesImpl extends Object implements KdTreeVisitor
For a given 3D point, this visitor returns the closest node(s) and its/their distance to the point.
  • Constructor Details

    • ClosestNodesImpl

      public ClosestNodesImpl(javax.vecmath.Point3d point)
      Constructor.
      Parameters:
      point - The 3D location for which the closest nodes are to be computed.
      Throws:
      IllegalArgumentException - if some parameter is wrong
  • Method Details

    • getDistance

      public double getDistance()
    • visitKdTree

      public void visitKdTree(KdTree kdTree)
      Description copied from interface: KdTreeVisitor
      The main inspection method to be implemented by specific visitors.
      Specified by:
      visitKdTree in interface KdTreeVisitor
      Parameters:
      kdTree - K-d tree to be visited
    • getClosestNodes

      protected Set<KdNode> getClosestNodes()
    • getAnyClosestNode

      protected KdNode getAnyClosestNode()
    • getReferencePoint

      protected javax.vecmath.Point3d getReferencePoint()
    • firstIsLessThanSecond

      protected boolean firstIsLessThanSecond(javax.vecmath.Point3d v1, javax.vecmath.Point3d v2, int level)
    • minDistanceIntersection

      protected double minDistanceIntersection(javax.vecmath.Point3d nodePosition, javax.vecmath.Point3d pointPosition, int level)
      Calculates distance between two points (currently searched node and point to which we want to find nearest neighbor) (based on axis)