pub struct TrsBatchSoa {
pub tx: Vec<f32>,
pub ty: Vec<f32>,
pub tz: Vec<f32>,
pub qx: Vec<f32>,
pub qy: Vec<f32>,
pub qz: Vec<f32>,
pub qw: Vec<f32>,
pub sx: Vec<f32>,
pub sy: Vec<f32>,
pub sz: Vec<f32>,
}Expand description
A field-split (struct-of-arrays) batch of translate/rotate/scale inputs.
Each field is its own contiguous f32 stream so a kernel can load eight
entities of one field into a single [f32x8]. Fill it from any source
(e.g. an ECS Transform column) with push; the engine’s
component types stay in the data crate, this buffer speaks only f32.
Fields§
§tx: Vec<f32>Translation X / Y / Z, one entry per entity.
ty: Vec<f32>Translation Y.
tz: Vec<f32>Translation Z.
qx: Vec<f32>Rotation quaternion X / Y / Z / W, one entry per entity.
qy: Vec<f32>Rotation quaternion Y.
qz: Vec<f32>Rotation quaternion Z.
qw: Vec<f32>Rotation quaternion W.
sx: Vec<f32>Scale X / Y / Z, one entry per entity.
sy: Vec<f32>Scale Y.
sz: Vec<f32>Scale Z.
Implementations§
Source§impl TrsBatchSoa
impl TrsBatchSoa
Sourcepub fn with_capacity(n: usize) -> Self
pub fn with_capacity(n: usize) -> Self
Creates an empty batch with room for n entities reserved in every field.
Trait Implementations§
Source§impl Clone for TrsBatchSoa
impl Clone for TrsBatchSoa
Source§fn clone(&self) -> TrsBatchSoa
fn clone(&self) -> TrsBatchSoa
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TrsBatchSoa
impl Debug for TrsBatchSoa
Source§impl Default for TrsBatchSoa
impl Default for TrsBatchSoa
Source§fn default() -> TrsBatchSoa
fn default() -> TrsBatchSoa
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TrsBatchSoa
impl RefUnwindSafe for TrsBatchSoa
impl Send for TrsBatchSoa
impl Sync for TrsBatchSoa
impl Unpin for TrsBatchSoa
impl UnsafeUnpin for TrsBatchSoa
impl UnwindSafe for TrsBatchSoa
Blanket Implementations§
Source§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
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