#[repr(C)]pub struct MeshNode {
pub lower_bound: Vec3,
pub data: u32,
pub upper_bound: Vec3,
pub triangle_offset: u32,
}Expand description
A mesh BVH node. (b3MeshNode)
The C union bitfield is packed into data:
- bits 0–1: axis (internal) or type (leaf; 3 = leaf)
- bits 2–31: childOffset (internal) or triangleCount (leaf)
Fields§
§lower_bound: Vec3§data: u32§upper_bound: Vec3§triangle_offset: u32Implementations§
Source§impl MeshNode
impl MeshNode
pub fn is_leaf(&self) -> bool
pub fn axis(&self) -> u32
pub fn child_offset(&self) -> u32
pub fn triangle_count(&self) -> u32
pub fn store_leaf(aabb: Aabb, triangle_count: i32, triangle_offset: i32) -> Self
pub fn store_internal(aabb: Aabb, axis: i32, child_offset: i32) -> Self
pub fn aabb(&self) -> Aabb
Trait Implementations§
impl Copy for MeshNode
impl StructuralPartialEq for MeshNode
Auto Trait Implementations§
impl Freeze for MeshNode
impl RefUnwindSafe for MeshNode
impl Send for MeshNode
impl Sync for MeshNode
impl Unpin for MeshNode
impl UnsafeUnpin for MeshNode
impl UnwindSafe for MeshNode
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