Class ClosestNodesImpl
java.lang.Object
cz.fidentis.analyst.engines.point2surface.impl.ClosestNodesImpl
- All Implemented Interfaces:
KdTreeVisitor
For a given 3D point, this visitor returns the closest node(s) and its/their distance to the point.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
firstIsLessThanSecond
(javax.vecmath.Point3d v1, javax.vecmath.Point3d v2, int level) protected KdNode
double
protected javax.vecmath.Point3d
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)void
visitKdTree
(KdTree kdTree) The main inspection method to be implemented by specific visitors.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.data.kdtree.KdTreeVisitor
isThreadSafe
-
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
Description copied from interface:KdTreeVisitor
The main inspection method to be implemented by specific visitors.- Specified by:
visitKdTree
in interfaceKdTreeVisitor
- Parameters:
kdTree
- K-d tree to be visited
-
getClosestNodes
-
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)
-