Skip to main content

compute_jacobian

Function compute_jacobian 

Source
pub fn compute_jacobian(r_a: [f64; 3], r_b: [f64; 3], n: [f64; 3]) -> [f64; 12]
Expand description

Compute the Jacobian row for a distance constraint between two bodies.

r_a — vector from body A’s center to the contact point. r_b — vector from body B’s center to the contact point. n — constraint normal direction (unit vector).

Returns [J_lin_a (3), J_ang_a (3), J_lin_b (3), J_ang_b (3)] = 12 values.