MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / weldJoint

Method weldJoint

src/main/java/trace/physics/PhysicsSystem.kt:197–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195 val w = world.createJoint(d)
196 return w
197 }
198
199 fun weldJoint(a: FLine, b: FLine, dampingRatio: Double, frequencyHz: Double): Joint {
200 val pa = addPhysics(a)
201 val pb = addPhysics(b)
202
203 val d = WeldJointDef()
204 d.initialize(pa.body, pb.body, convert(field.linalg.Vec2(0.0, 0.0)));
205 d.dampingRatio = dampingRatio.toFloat()
206 d.frequencyHz = frequencyHz.toFloat()
207 val w = world.createJoint(d)
208 return w
209 }
210

Callers

nothing calls this directly

Calls 2

Vec2Method · 0.80
initializeMethod · 0.45

Tested by

no test coverage detected