[−][src]Struct generic_octree::octree::Octree
Fields
content: HashMap<LocCode<L>, OctreeNode<D>>
Implementations
impl<L, D> Octree<L, D> where
L: Eq + Hash + Copy + Debug,
[src]
L: Eq + Hash + Copy + Debug,
impl<T, D> Octree<T, D> where
T: Ord + Hash + From<u8> + Shr<Output = T> + Shl<Output = T> + BitOr<Output = T> + Copy + Debug,
D: Copy + PartialEq,
[src]
T: Ord + Hash + From<u8> + Shr<Output = T> + Shl<Output = T> + BitOr<Output = T> + Copy + Debug,
D: Copy + PartialEq,
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: LocCode<T>) -> Option<&OctreeNode<D>>
[src]
Return a tree node a node.
pub fn insert(
&mut self,
location: LocCode<T>,
node: OctreeNode<D>
) -> LocCode<T>
[src]
&mut self,
location: LocCode<T>,
node: OctreeNode<D>
) -> LocCode<T>
Insert a tree node.
pub fn remove_node(&mut self, loc_code: LocCode<T>)
[src]
pub fn merge(&mut self, aabb: AABB, data: D)
[src]
Merge an AABB into the tree
pub fn transform<U: From<D>>(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, F: Fn(D) -> U>(self, function: F) -> Octree<T, U>
[src]
tree.transform_fn(Rgb::from_hex);
pub fn transform_nodes_fn<U, F: Fn(LocCode<T>, OctreeNode<D>) -> OctreeNode<U>>(
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> where
D: Send,
L: Send,
D: Send,
L: Send,
impl<L, D> Sync for Octree<L, D> where
D: Sync,
L: Sync,
D: Sync,
L: Sync,
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: UnwindSafe,
L: UnwindSafe,
D: UnwindSafe,
L: 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>,