Struct rl_ball_sym::simulation::bvh::BvhNode
source · [−]pub struct BvhNode {
pub is_terminal: bool,
pub box_: Aabb,
pub right: Option<Box<BvhNode>>,
pub left: Option<Box<BvhNode>>,
pub primitive: Option<Tri>,
pub morton: Option<u64>,
}
Expand description
A node in the BVH.
Fields
is_terminal: bool
Whether this node is a leaf.
If it is, then the left
and right
fields are None and primative
isn’t.
box_: Aabb
The bounding box of this node.
right: Option<Box<BvhNode>>
One-half of the bounding box. None if is_terminal
is true.
left: Option<Box<BvhNode>>
One-half of the bounding box. None if is_terminal
is true.
primitive: Option<Tri>
The primitive that this node represents. None if is_terminal
is false.
morton: Option<u64>
The morton code of this node.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BvhNode
impl Send for BvhNode
impl Sync for BvhNode
impl Unpin for BvhNode
impl UnwindSafe for BvhNode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more