Skip to main content

compute_rigid_mesh_vertices

Function compute_rigid_mesh_vertices 

Source
pub fn compute_rigid_mesh_vertices(
    rest_x: &[f32],
    rest_y: &[f32],
    world: &SsMatrix4x4,
    flip_rest_y: bool,
    out_x: &mut [f32],
    out_y: &mut [f32],
)
Expand description

Rigidly transforms a Deform-only mesh’s rest vertices by the part’s world matrix — out = W · rest for every vertex. SoA layout in and out, computed four vertices at a time with f32x4; the contiguous SoA loads keep the input gather vectorizable. The per-frame deform delta is a sparse scatter and is applied separately (scalar) by the caller.

flip_rest_y negates the rest Y. The rest comes from the cell’s table_coord_x / table_coord_y (Y-down native), so it flips for a Y-up target — the opposite of the Y-up-native skinned bind coordinates.