#[repr(C)]pub struct KdNode {
pub split_axis: u8,
pub _pad: [u8; 3],
pub point_index: u32,
pub left: u32,
pub right: u32,
pub parent: u32,
pub bbox_min: [f32; 3],
}Expand description
kd-tree node: 32 bytes, repr(C), naturally aligned.
offset size field
0 4 split_axis:u8 + padding[3]
4 4 point_index:u32 (index into the original point array)
8 4 left:u32 (left child node index, or INVALID_INDEX)
12 4 right:u32 (right child node index, or INVALID_INDEX)
16 4 parent:u32
20 12 bbox_min:[f32;3] (tight bbox of this subtree)For 2D trees, z components are zero.
Fields§
§split_axis: u8§_pad: [u8; 3]§point_index: u32§left: u32§right: u32§parent: u32§bbox_min: [f32; 3]Trait Implementations§
impl Copy for KdNode
impl Pod for KdNode
impl StructuralPartialEq for KdNode
Auto Trait Implementations§
impl Freeze for KdNode
impl RefUnwindSafe for KdNode
impl Send for KdNode
impl Sync for KdNode
impl Unpin for KdNode
impl UnsafeUnpin for KdNode
impl UnwindSafe for KdNode
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.