(def *B2DistanceJointDef)
| 137 | } |
| 138 | |
| 139 | func MakeB2DistanceJoint(def *B2DistanceJointDef) *B2DistanceJoint { |
| 140 | res := B2DistanceJoint{ |
| 141 | B2Joint: MakeB2Joint(def), |
| 142 | } |
| 143 | |
| 144 | res.M_localAnchorA = def.LocalAnchorA |
| 145 | res.M_localAnchorB = def.LocalAnchorB |
| 146 | res.M_length = def.Length |
| 147 | res.M_frequencyHz = def.FrequencyHz |
| 148 | res.M_dampingRatio = def.DampingRatio |
| 149 | res.M_impulse = 0.0 |
| 150 | res.M_gamma = 0.0 |
| 151 | res.M_bias = 0.0 |
| 152 | |
| 153 | return &res |
| 154 | } |
| 155 | |
| 156 | func (joint *B2DistanceJoint) InitVelocityConstraints(data B2SolverData) { |
| 157 | joint.M_indexA = joint.M_bodyA.M_islandIndex |
no test coverage detected