Point-to-point constraint C = p2 - p1 Cdot = v2 - v1 = v2 + cross(w2, r2) - v1 - cross(w1, r1) J = [-I -r1_skew I r2_skew ] Identity used: w k % (rx i + ry j) = w * (-ry i + rx j) Angle constraint C = angle2 - angle1 - referenceAngle Cdot = w2 - w1 J = [0 0 -1 0 0 1] K = invI1 + invI2
(bA *B2Body, bB *B2Body, anchor B2Vec2)
| 121 | // // K = invI1 + invI2 |
| 122 | |
| 123 | func (def *B2WeldJointDef) Initialize(bA *B2Body, bB *B2Body, anchor B2Vec2) { |
| 124 | def.BodyA = bA |
| 125 | def.BodyB = bB |
| 126 | def.LocalAnchorA = def.BodyA.GetLocalPoint(anchor) |
| 127 | def.LocalAnchorB = def.BodyB.GetLocalPoint(anchor) |
| 128 | def.ReferenceAngle = def.BodyB.GetAngle() - def.BodyA.GetAngle() |
| 129 | } |
| 130 | |
| 131 | func MakeB2WeldJoint(def *B2WeldJointDef) *B2WeldJoint { |
| 132 | res := B2WeldJoint{ |
nothing calls this directly
no test coverage detected