[−][src]Struct building_blocks_partition::octree::Octree
A sparse set of voxel coordinates (3D integer points). Supports spatial queries.
The octree is a cube shape and the edge lengths can only be a power of 2, at most 64. When an entire octant is full, it will be stored in a collapsed representation, so the leaves of the tree can be differently sized octants.
Implementations
impl Octree
[src]
pub fn from_array3<A, T>(array: &A, extent: Extent3i) -> Self where
A: Array<[i32; 3]> + GetUncheckedRelease<Stride, T>,
T: Clone + IsEmpty,
[src]
A: Array<[i32; 3]> + GetUncheckedRelease<Stride, T>,
T: Clone + IsEmpty,
Constructs an Octree
which contains all of the points in extent
which are not empty (as
defined by the IsEmpty
trait). extent
must be cube-shaped with edge length being a power
of 2. For exponent E where edge length is 2^E, we must have 0 < E <= 6
, because there is a
maximum fixed depth of the octree.
pub fn edge_length(&self) -> i32
[src]
pub fn octant(&self) -> Octant
[src]
The entire octant spanned by the octree.
pub fn extent(&self) -> &Extent3i
[src]
The extent spanned by the octree.
pub fn is_empty(&self) -> bool
[src]
Returns true
iff the octree contains zero points.
pub fn visit(&self, visitor: &mut impl OctreeVisitor) -> VisitStatus
[src]
Visit every non-empty octant of the octree.
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,
pub 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.
pub 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>,