pub struct BvhNode {
pub aabb_min: [f32; 3],
pub aabb_max: [f32; 3],
pub left: u32,
pub right: u32,
pub is_leaf: bool,
pub tri_idx: u32,
}Expand description
A BVH (bounding-volume hierarchy) node.
Fields§
§aabb_min: [f32; 3]Minimum corner of the axis-aligned bounding box.
aabb_max: [f32; 3]Maximum corner of the axis-aligned bounding box.
left: u32Index of the left child (used when is_leaf == false).
right: u32Index of the right child (used when is_leaf == false).
is_leaf: boolTrue if this node stores a triangle directly.
tri_idx: u32Triangle index stored by this leaf node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BvhNode
impl RefUnwindSafe for BvhNode
impl Send for BvhNode
impl Sync for BvhNode
impl Unpin for BvhNode
impl UnsafeUnpin for BvhNode
impl UnwindSafe for BvhNode
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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