cf_b3_to_m4¶
Category: physics
GitHub: cute_physics.h
Converts a b3Transform to a CF_M4x4, e.g. a body's transform for rendering.
CF_M4x4 cf_b3_to_m4(b3Transform tf) { return cf_m4_from_trs(cf_b3_to_v3(tf.p), cf_b3_to_quat(tf.q), cf_v3(1.0f, 1.0f, 1.0f)); }
Remarks¶
Pull a body's pose with b3Body_GetTransform and hand the result to
cf_draw3d_transform (or compose scale on top with cf_m4_from_trs).