[−][src]Struct generic_octree::Octree
Fields
content: HashMap<L, OctreeNode<D>>
Implementations
impl<'a, L, D> Octree<L, D> where
L: LocCode,
D: Send + Sync,
[src]
L: LocCode,
D: Send + Sync,
impl<'a, T, D> Octree<T, D> where
T: LocCode,
D: Copy + PartialEq + Send + Sync,
[src]
T: LocCode,
D: Copy + PartialEq + Send + Sync,
pub fn new(max_depth: u32) -> Self
[src]
Create a new Octree
pub fn with_capacity(max_depth: u32, size: usize) -> Self
[src]
Create an Octree with given pre-allocated space.
pub fn depth(&self) -> u32
[src]
pub fn lookup(&self, loc_code: T) -> Option<&OctreeNode<D>>
[src]
Return a tree node a node.
pub fn insert(&mut self, location: T, node: OctreeNode<D>) -> T
[src]
Insert a tree node.
pub fn remove_node(&mut self, loc_code: T)
[src]
pub fn merge(&mut self, aabb: AABB, data: D)
[src]
Merge an AABB into the tree
pub fn transform<U: From<D> + Send + Sync>(self) -> Octree<T, U>
[src]
Transform an Octree of data D into an Octree of data U, provided that
U implement From
pub fn transform_fn<U: Send + Sync, F: Fn(D) -> U + Sync>(
self,
function: F
) -> Octree<T, U>
[src]
self,
function: F
) -> Octree<T, U>
tree.transform_fn(Rgb::from_hex);
pub fn transform_nodes_fn<U: Send + Sync, F: Fn(T, OctreeNode<D>) -> OctreeNode<U> + Sync>(
self,
function: F
) -> Octree<T, U>
[src]
self,
function: F
) -> Octree<T, U>
tree.transform_fn(Rgb::from_hex);
Trait Implementations
Auto Trait Implementations
impl<L, D> RefUnwindSafe for Octree<L, D> where
D: RefUnwindSafe,
L: RefUnwindSafe,
D: RefUnwindSafe,
L: RefUnwindSafe,
impl<L, D> Send for Octree<L, D>
impl<L, D> Sync for Octree<L, D>
impl<L, D> Unpin for Octree<L, D> where
D: Unpin,
L: Unpin,
D: Unpin,
L: Unpin,
impl<L, D> UnwindSafe for Octree<L, D> where
D: RefUnwindSafe + UnwindSafe,
L: RefUnwindSafe + UnwindSafe,
D: RefUnwindSafe + UnwindSafe,
L: RefUnwindSafe + UnwindSafe,
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, 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>,