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) Motor constraint Cdot = w2 - w1 J = [0 0 -1 0 0 1] K = invI1 + invI2
(bA *B2Body, bB *B2Body, anchor B2Vec2)
| 144 | // K = invI1 + invI2 |
| 145 | |
| 146 | func (def *B2RevoluteJointDef) Initialize(bA *B2Body, bB *B2Body, anchor B2Vec2) { |
| 147 | def.BodyA = bA |
| 148 | def.BodyB = bB |
| 149 | def.LocalAnchorA = def.BodyA.GetLocalPoint(anchor) |
| 150 | def.LocalAnchorB = def.BodyB.GetLocalPoint(anchor) |
| 151 | def.ReferenceAngle = def.BodyB.GetAngle() - def.BodyA.GetAngle() |
| 152 | } |
| 153 | |
| 154 | func MakeB2RevoluteJoint(def *B2RevoluteJointDef) *B2RevoluteJoint { |
| 155 | res := B2RevoluteJoint{ |
nothing calls this directly
no test coverage detected