if (def.type == JointType.GearJoint) {
GearJointDef d = (GearJointDef)def;
return jniCreateGearJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.joint1.addr, d.joint2.addr, d.ratio);
}
if (def.type == JointType.MotorJoint) {
MotorJointDef d = (MotorJointDef)def;
return jniCreateMotorJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.linearOffset.x, d.linearOffset.y,
d.angularOffset, d.maxForce, d.maxTorque, d.correctionFactor);
}
if (def.type == JointType.MouseJoint) {
MouseJointDef d = (MouseJointDef)def;