Open recatek opened 2 years ago
Not really. I'm not sure what the best way is and I'm not sure that it would be worth it, either. Lots of random-ish memory access and copying to do this. If you want to process with Vec3x4 then should just store as pos: Vec<Vec3x4>
probably. But I haven't measured, either
Apologies if this is covered in the docs somewhere, I wasn't able to find anything about best practices on this.
Is there a helper function, or some guidance on the best way to store floats in columns, e.g.
but convert them into
Vec3x4
chunks (with some possible remainingVec3
s) for processing?I'm guessing some use of
chunks_exact
andremainder
would work here -- iterate each column in chunks of 4, get anf32x4
from each chunk (is there an easy conversion for this?), convert the three zippedf32x4
s into aVec3x4
, perform operations, and then break it all apart again to store the result, with some special cases for the remaining <4f32
s into a regularVec3
. Is this ever done in practice? Is it worth it? It would be nice to preserve the ability to easily access a single entity's(x, y, z)
from those columns.