#[repr(C)]pub struct QuadTreeNode {
pub center_x: f32,
pub center_y: f32,
pub mass: f32,
pub width: f32,
pub child_nw: i32,
pub child_ne: i32,
pub child_sw: i32,
pub child_se: i32,
}Expand description
Barnes-Hut quadtree node for GPU upload. This is a flattened representation suitable for GPU processing.
Fields§
§center_x: f32Center of mass X
center_y: f32Center of mass Y
mass: f32Total mass (number of nodes in this cell)
width: f32Cell width (for Barnes-Hut theta criterion)
child_nw: i32Index of first child (-1 if leaf or empty)
child_ne: i32§child_sw: i32§child_se: i32Trait Implementations§
Source§impl Clone for QuadTreeNode
impl Clone for QuadTreeNode
Source§fn clone(&self) -> QuadTreeNode
fn clone(&self) -> QuadTreeNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QuadTreeNode
impl Debug for QuadTreeNode
Source§impl Default for QuadTreeNode
impl Default for QuadTreeNode
Source§fn default() -> QuadTreeNode
fn default() -> QuadTreeNode
Returns the “default value” for a type. Read more
impl Copy for QuadTreeNode
impl Pod for QuadTreeNode
Auto Trait Implementations§
impl Freeze for QuadTreeNode
impl RefUnwindSafe for QuadTreeNode
impl Send for QuadTreeNode
impl Sync for QuadTreeNode
impl Unpin for QuadTreeNode
impl UnsafeUnpin for QuadTreeNode
impl UnwindSafe for QuadTreeNode
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§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.Source§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.