Trait eightfold::OctreeSlice
source · [−]pub trait OctreeSlice<T, Idx: TreeIndex> {
fn root_idx(&self) -> Idx;
fn height_from(&self, index: Idx) -> Idx;
fn leaf_dfi(&self) -> LeafIter<'_, T, Idx>ⓘNotable traits for LeafIter<'tree, T, Idx>impl<'tree, T, Idx: TreeIndex> Iterator for LeafIter<'tree, T, Idx>where
u8: AsPrimitive<Idx>, type Item = (&'tree T, NodePoint<Idx>);
;
fn height(&self) -> Idx { ... }
fn grid_size(&self) -> Idx { ... }
}
Expand description
Trait for Octree references.
Required Methods
sourcefn height_from(&self, index: Idx) -> Idx
fn height_from(&self, index: Idx) -> Idx
The height of a subtree, originating at a specific node.
sourcefn leaf_dfi(&self) -> LeafIter<'_, T, Idx>ⓘNotable traits for LeafIter<'tree, T, Idx>impl<'tree, T, Idx: TreeIndex> Iterator for LeafIter<'tree, T, Idx>where
u8: AsPrimitive<Idx>, type Item = (&'tree T, NodePoint<Idx>);
fn leaf_dfi(&self) -> LeafIter<'_, T, Idx>ⓘNotable traits for LeafIter<'tree, T, Idx>impl<'tree, T, Idx: TreeIndex> Iterator for LeafIter<'tree, T, Idx>where
u8: AsPrimitive<Idx>, type Item = (&'tree T, NodePoint<Idx>);
u8: AsPrimitive<Idx>, type Item = (&'tree T, NodePoint<Idx>);
Depth-first iterator through all leafs, from deepest to shallowest & nearest to farthest (by Octant ordering).