[−][src]Struct octree::Octree
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]
&self,
p: [f64; 3],
radius: f64
) -> impl Iterator<Item = (usize, f64)> + '_
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,