Skip to content

novaphy.batch_transform_vertices

Transform several bodies' local vertex batches into a preallocated world-space output buffer.

def batch_transform_vertices(
    positions,
    quats,
    body_indices,
    local_verts,
    out_vertices,
) -> None
Parameter Description
positions (num_bodies, 3) float32 body positions.
quats (num_bodies, 4) float32 body quaternions in [x, y, z, w] order.
body_indices (N,) int32 indices selecting a transform for each vertex batch.
local_verts (N, V, 3) float32 local-space vertices.
out_vertices Preallocated writable, C-contiguous (N * V, 3) float32 output buffer.

The function writes batch i to out_vertices[i * V:(i + 1) * V] and returns None. Do not pass a strided or non-float32 output: pybind11 may create a temporary force-cast array, in which case writes do not reach the original object.

See Also