pub struct FieldSoaColumn<T: SoaLayout> { /* private fields */ }Expand description
A field-split component column: one contiguous Vec<f32> per component
field.
Stored behind Box<dyn AnyVec> exactly like an AoS Vec<T> column, so it
participates in the normal page lifecycle (spawn / despawn / migration /
serialization). Access is by value (get) or in bulk through
the per-field field slices for SIMD kernels.
Implementations§
Source§impl<T: SoaLayout> FieldSoaColumn<T>
impl<T: SoaLayout> FieldSoaColumn<T>
Sourcepub fn field(&self, field: usize) -> &[f32]
pub fn field(&self, field: usize) -> &[f32]
Read-only access to one field’s array (field < FIELD_COUNT) — the
contiguous f32 stream a SIMD kernel tiles over.
Sourcepub fn fields_mut(&mut self) -> &mut [Vec<f32>]
pub fn fields_mut(&mut self) -> &mut [Vec<f32>]
All field arrays (mutable) — for a kernel that writes several fields.
Trait Implementations§
Source§impl<T: SoaLayout> AnyVec for FieldSoaColumn<T>
impl<T: SoaLayout> AnyVec for FieldSoaColumn<T>
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Casts the trait object to
&mut dyn Any.Source§fn swap_remove_any(&mut self, index: usize)
fn swap_remove_any(&mut self, index: usize)
Performs a
swap_remove on the underlying column, removing the element at index.Source§unsafe fn set_from_bytes(
&mut self,
bytes: &[u8],
) -> Result<(), SetFromBytesError>
unsafe fn set_from_bytes( &mut self, bytes: &[u8], ) -> Result<(), SetFromBytesError>
Auto Trait Implementations§
impl<T> Freeze for FieldSoaColumn<T>
impl<T> RefUnwindSafe for FieldSoaColumn<T>
impl<T> Send for FieldSoaColumn<T>
impl<T> Sync for FieldSoaColumn<T>
impl<T> Unpin for FieldSoaColumn<T>
impl<T> UnsafeUnpin for FieldSoaColumn<T>
impl<T> UnwindSafe for FieldSoaColumn<T>
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