clean up
This commit is contained in:
parent
91dae873e2
commit
cc3b0215c8
2 changed files with 5 additions and 3 deletions
|
|
@ -1325,11 +1325,12 @@ B3_FORCE_INLINE void b3SolveContactsW( b3SolverBlock block, b3StepContext* conte
|
|||
b3Vec3W rA = cm->centerA;
|
||||
b3Vec3W rB = cm->centerB;
|
||||
|
||||
b3Vec3W angularRelativeVelocity = b3SubVW( b3CrossW( bB.w, rB ), b3CrossW( bA.w, rA ) );
|
||||
|
||||
// Relative tangent velocity at contact
|
||||
b3Vec3W vr = b3SubVW( b3CrossW( bB.w, rB ), b3CrossW( bA.w, rA ) );
|
||||
b3Vec2W vt = {
|
||||
b3AddW( linearTangentVelocity1, b3DotW( vr, tangent1 ) ),
|
||||
b3AddW( linearTangentVelocity2, b3DotW( vr, tangent2 ) ),
|
||||
b3AddW( linearTangentVelocity1, b3DotW( angularRelativeVelocity, tangent1 ) ),
|
||||
b3AddW( linearTangentVelocity2, b3DotW( angularRelativeVelocity, tangent2 ) ),
|
||||
};
|
||||
|
||||
// Incremental tangent impulse
|
||||
|
|
|
|||
|
|
@ -414,6 +414,7 @@ void b3DrawSphericalJoint( b3DebugDraw* draw, b3JointSim* base, b3WorldTransform
|
|||
void b3DrawWeldJoint( b3DebugDraw* draw, b3JointSim* base, b3WorldTransform transformA, b3WorldTransform transformB, float scale );
|
||||
void b3DrawWheelJoint( b3DebugDraw* draw, b3JointSim* base, b3WorldTransform transformA, b3WorldTransform transformB, float scale );
|
||||
|
||||
// K = [(1/m1 + 1/m2) * eye(2) - skew(r1) * invI1 * skew(r1) - skew(r2) * invI2 * skew(r2)]
|
||||
static inline b3Vec3 b3SolvePointConstraint( float mA, float mB, b3Matrix3 iA, b3Matrix3 iB, b3Vec3 rA, b3Vec3 rB, b3Vec3 rhs )
|
||||
{
|
||||
float axy = rA.z * iA.cy.y - rA.y * iA.cz.y;
|
||||
|
|
|
|||
Loading…
Reference in a new issue