The Cuik KD-Tree Library
cuik-kdtree.h File Reference Headers of the kd-tree implementation. More...
Include dependency graph for cuik-kdtree.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Detailed DescriptionHeaders of the kd-tree implementation.
Definition in file cuik-kdtree.h. Macro Definition Documentation
When set, it generates a file of the kd-tree that can be visualized with geomview. This only works for kd-trees defined in 3d and it is more useful when the points are defined on a manifold (see POINTS_ON_SPHERE). Definition at line 30 of file cuik-kdtree.h.
Casts a void pointer into a KDtree pointer. Definition at line 38 of file cuik-kdtree.h. Referenced by AddPoint2KDtree(), BuildKDTree(), DeleteKDtree(), PrintKDtree(), SampleInKDtree(), SearchInBallKDtree(), and SearchKDtree(). Function Documentation
Kd-tree constructor.
Definition at line 544 of file cuik-kdtree.c. References ANGLE_ACCURACY, BuildKDTree(), GetRectangleDim(), GetRectangleLimits(), M_PI, SetRectangleLimits(), and TOPOLOGY_S. Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
Adds a point to a kd-tree.
Definition at line 582 of file cuik-kdtree.c. References AddPoint2KDtree(), TKDtree::ambient, TKDtree::boundingBox, BuildKDTree(), CopyRectangle(), DeleteKDtree(), EnlargeRectangleWithLimits(), ExpandRectangle(), TKDtree::height, TKDtree::id, INF, InitRectangleFromPoint(), TKDtree::isLeaf, KDTPTR, TKDtree::left, TKDtree::leftLeaf, TKDtree::m, TKDtree::n, TKDtree::nd, NEW, TKDtree::nextLeaf, TKDtree::p, TKDtree::r, TKDtree::right, TKDtree::rightLeaf, TKDtree::samplingBox, TKDtree::splitDim, TKDtree::splitValue, TKDtree::topology, VectorSquaredDistanceTopologyMin(), and TKDtree::volume. Referenced by AddPoint2KDtree(), and main().
Here is the call graph for this function:
Here is the caller graph for this function:
Uses the kd-tree to find the nearest-neighbour of a given point.
Definition at line 714 of file cuik-kdtree.c. References INF, TKDtree::n, NO_UINT, and SearchKDtree(). Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
Determines all the points in a given ball.
Definition at line 730 of file cuik-kdtree.c. References TKDtree::n, NEW, and SearchInBallKDtree(). Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
Geneates a random sample in the volume covered by the kd-tree expanded by a given factor ('r' given in the kd-tree construction) with uniform distribution.
Definition at line 747 of file cuik-kdtree.c. References TKDtree::isLeaf, KDTPTR, TKDtree::left, randomDouble(), RandomPointInRectangle(), TKDtree::right, SampleInKDtree(), TKDtree::samplingBox, and TKDtree::volume. Referenced by SampleInKDtree().
Here is the call graph for this function:
Here is the caller graph for this function:
Returns the sampling expansion used in the kd-tree.
Definition at line 764 of file cuik-kdtree.c. References TKDtree::r.
Prints a kd-tree. Used for debug.
Definition at line 769 of file cuik-kdtree.c. References TKDtree::boundingBox, TKDtree::id, TKDtree::isLeaf, KDTPTR, KDTREE_PRINT_INDENT, TKDtree::left, TKDtree::n, TKDtree::nd, TKDtree::p, PrintKDtree(), PrintRectangle(), TKDtree::right, TKDtree::splitDim, and TKDtree::splitValue. Referenced by PrintKDtree().
Here is the call graph for this function:
Here is the caller graph for this function:
Plots the kd-tree points and the sampling areas bounding these points. This is used for debug and it only works for points in 3D. The generated file con be visualized with geomview.
Referenced by main().
Here is the caller graph for this function:
Destructor Definition at line 833 of file cuik-kdtree.c. References TKDtree::ambient, TKDtree::boundingBox, DeleteKDtree(), DeleteRectangle(), TKDtree::id, TKDtree::isLeaf, KDTPTR, TKDtree::left, TKDtree::n, TKDtree::p, TKDtree::right, TKDtree::samplingBox, and TKDtree::topology. Referenced by AddPoint2KDtree(), DeleteKDtree(), and main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
Follow us!