Struct rust_3d::kd_tree::KdTree
[−]
[src]
pub struct KdTree<P> where
P: Is3D, { pub root: Option<KdNode<P>>, }
KdTree
Fields
root: Option<KdNode<P>>
Trait Implementations
impl<P: Default> Default for KdTree<P> where
P: Is3D,
[src]
P: Is3D,
impl<P> IsTree3D<P> for KdTree<P> where
P: IsBuildableND + IsBuildable3D + Clone + Default,
[src]
P: IsBuildableND + IsBuildable3D + Clone + Default,
fn size(&self) -> usize
Should return the number of elements within the tree
fn to_pointcloud(&self) -> PointCloud3D<P>
Should return all positions within the tree as point cloud
fn build(&mut self, pc: PointCloud3D<P>) -> bool
Should create a new tree from a given point cloud
impl<P> IsKdTree3D<P> for KdTree<P> where
P: IsEditable3D + IsBuildableND + IsBuildable3D + Clone + Default,
[src]
P: IsEditable3D + IsBuildableND + IsBuildable3D + Clone + Default,
fn knearest(&self, search: &P, n: usize) -> PointCloud3D<P>
Should return the k nearest neighbours to search
fn in_sphere(&self, search: &P, radius: f64) -> PointCloud3D<P>
Should return all positions within a sphere around search
fn in_box(
&self,
search: &P,
x_size: f64,
y_size: f64,
z_size: f64
) -> PointCloud3D<P>
&self,
search: &P,
x_size: f64,
y_size: f64,
z_size: f64
) -> PointCloud3D<P>
Should return all positions within a box around search
fn nearest(&self, search: &P) -> Result<P>
Should return the nearest neighbour to search, if there is any