return jniCreateRevoluteJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.localAnchorA.x, d.localAnchorA.y,
d.localAnchorB.x, d.localAnchorB.y, d.referenceAngle, d.enableLimit, d.lowerAngle, d.upperAngle, d.enableMotor,
d.motorSpeed, d.maxMotorTorque);
}
if (def.type == JointType.WeldJoint) {
WeldJointDef d = (WeldJointDef)def;
return jniCreateWeldJoint(addr, d.bodyA.addr, d.bodyB.addr, d.collideConnected, d.localAnchorA.x, d.localAnchorA.y,
d.localAnchorB.x, d.localAnchorB.y, d.referenceAngle);
}
if (def.type == JointType.RopeJoint) {
RopeJointDef d = (RopeJointDef)def;