[][src]Struct octree::Octree

pub struct Octree {
    pub points: Vec<[f64; 3]>,
    // some fields omitted
}

Fields

points: Vec<[f64; 3]>

reference points in 3D space

Methods

impl Octree[src]

pub fn new(points: impl IntoIterator<Item = [f64; 3]>) -> Self[src]

Construct octree from points in 3D space

pub fn count(&self) -> usize[src]

Count octants in octree.

pub fn is_empty(&self) -> bool[src]

Returns true if octree has no octant, false otherwise

impl Octree[src]

pub fn build(&mut self, bucket_size: usize)[src]

Build octree by recursively dividing child octants

  • Parameters
  • bucket_size: the max number of points each octant holds before stopping recursively dividing.

impl Octree[src]

pub fn search(
    &self,
    p: [f64; 3],
    radius: f64
) -> impl Iterator<Item = (usize, f64)> + '_
[src]

Search nearby points within radius of center.

Parameters

  • p: the coordinates of the point searching for neighbors.
  • radius: the cutoff radius for neighbors.

Return

indices of nearby points and distances

Trait Implementations

impl Clone for Octree[src]

impl Debug for Octree[src]

Auto Trait Implementations

impl RefUnwindSafe for Octree

impl Send for Octree

impl Sync for Octree

impl Unpin for Octree

impl UnwindSafe for Octree

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.