MCPcopy Create free account
hub / github.com/ByteArena/box2d / MakeB2DistanceJoint

Function MakeB2DistanceJoint

DynamicsB2JointDistance.go:139–154  ·  view source on GitHub ↗
(def *B2DistanceJointDef)

Source from the content-addressed store, hash-verified

137}
138
139func 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
156func (joint *B2DistanceJoint) InitVelocityConstraints(data B2SolverData) {
157 joint.M_indexA = joint.M_bodyA.M_islandIndex

Callers 1

B2JointCreateFunction · 0.85

Calls 1

MakeB2JointFunction · 0.85

Tested by

no test coverage detected