public class KdTree<X extends Jcg.geometry.Point_>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
cutDimension |
private double |
cutValue |
private KdTree<X> |
lowerHalf |
private int |
numPoints |
private int |
pointDimension |
private PointCloud |
points |
private KdTree<X> |
upperHalf |
Constructor and Description |
---|
KdTree(PointCloud N,
int pDim,
int cutDim)
Constructor -- builds the entire Kd-tree at once recursively
|
Modifier and Type | Method and Description |
---|---|
static <X extends Jcg.geometry.Point_> |
checkBalance(KdTree<X> t) |
static <X extends Jcg.geometry.Point_> |
constructDataStructure(PointCloud N,
int pDim)
Construct a Kd-Tree from a point cloud (in dimension pDim)
|
static <X extends Jcg.geometry.Point_> |
leavesNumber(KdTree<X> t) |
PointCloud |
OrthogonalRangeSearch(X q,
double sqRad)
Range search: return the list of nearest point to a given query point q.
|
static <X extends Jcg.geometry.Point_> |
size(KdTree<X> t) |
static PointCloud[] |
split(PointCloud N,
double cutValue,
int cutDim)
Split a point cloud into two sub-point clouds (lower an upper point clouds)
|
static <X extends Jcg.geometry.Point_> |
toList(KdTree<X> t,
java.util.ArrayList<Jcg.geometry.Point_d> list) |
static <X extends Jcg.geometry.Point_> |
toString(KdTree<X> t) |
private int pointDimension
private int cutDimension
private double cutValue
private int numPoints
private PointCloud points
public KdTree(PointCloud N, int pDim, int cutDim)
public static PointCloud[] split(PointCloud N, double cutValue, int cutDim)
public static <X extends Jcg.geometry.Point_> KdTree<X> constructDataStructure(PointCloud N, int pDim)
public PointCloud OrthogonalRangeSearch(X q, double sqRad)
public static <X extends Jcg.geometry.Point_> int size(KdTree<X> t)
public static <X extends Jcg.geometry.Point_> boolean checkBalance(KdTree<X> t)
public static <X extends Jcg.geometry.Point_> int leavesNumber(KdTree<X> t)
public static <X extends Jcg.geometry.Point_> java.lang.String toString(KdTree<X> t)
public static <X extends Jcg.geometry.Point_> java.util.ArrayList<Jcg.geometry.Point_d> toList(KdTree<X> t, java.util.ArrayList<Jcg.geometry.Point_d> list)