#[repr(C)]pub struct BodyUniform {
pub position: [f32; 4],
pub kind: f32,
pub radius_or_shape: f32,
pub polytope_size: f32,
pub _pad0: f32,
pub color: [f32; 3],
pub _pad1: f32,
pub rotor: [f32; 8],
}Expand description
80 bytes, matching the kernel’s BodyUniform; the rotor packs as two vec4.
Fields§
§position: [f32; 4]§kind: f32§radius_or_shape: f32§polytope_size: f32§_pad0: f32§color: [f32; 3]§_pad1: f32§rotor: [f32; 8]Implementations§
Source§impl BodyUniform
impl BodyUniform
pub fn sphere(position: [f32; 4], radius: f32, color: [f32; 3]) -> Self
pub fn polytope( position: [f32; 4], shape_index: u32, size: f32, rotor: [f32; 8], color: [f32; 3], ) -> Self
pub fn polytope_with_rotor( position: [f32; 4], shape_index: u32, size: f32, rotor: Rotor4, color: [f32; 3], ) -> Self
Trait Implementations§
Source§impl Clone for BodyUniform
impl Clone for BodyUniform
Source§fn clone(&self) -> BodyUniform
fn clone(&self) -> BodyUniform
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 BodyUniform
impl Debug for BodyUniform
Source§impl Default for BodyUniform
impl Default for BodyUniform
impl Copy for BodyUniform
impl Pod for BodyUniform
Auto Trait Implementations§
impl Freeze for BodyUniform
impl RefUnwindSafe for BodyUniform
impl Send for BodyUniform
impl Sync for BodyUniform
impl Unpin for BodyUniform
impl UnsafeUnpin for BodyUniform
impl UnwindSafe for BodyUniform
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
§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.