Draw sleep velocity (#49)

- draw sleep velocity for debugging
- added back shape names with B3_SHAPE_NAME_LENGTH
- zup command line option
This commit is contained in:
Erin Catto 2026-07-05 00:33:00 -07:00 • committed by GitHub
commit 540ea387b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 554 additions and 132 deletions

View file

@ -203,14 +203,16 @@ static inline b3Quat b3QuatFromExponentialMap( b3Vec3 v )
/// q2 = q1 + 0.5 * omega * q1
static inline b3Quat b3IntegrateRotation( b3Quat q1, b3Vec3 deltaRotation )
{
#if 1
// https://fgiesen.wordpress.com/2012/08/24/quaternion-differentiation/
b3Quat qd = { b3MulSV( 0.5f, deltaRotation ), 0.0f };
qd = b3MulQuat( qd, q1 );
b3Quat q2 = { b3Add( q1.v, qd.v ), qd.s + q1.s };
q2 = b3NormalizeQuat( q2 );
return q2;
// return b3NormalizeQuat( b3MulQuat(b3QuatFromExponentialMap( deltaRotation ), q1) );
#else
return b3NormalizeQuat( b3MulQuat(b3QuatFromExponentialMap( deltaRotation ), q1) );
#endif
}
// Pseudo angular velocity from a quaternion target