internal static Joint Create(JointDef def){ Joint joint = null; switch (def.type) { case JointType.e_distanceJoint: { joint = new DistanceJoint((DistanceJointDef)def); } break; case JointType.e_mouseJoint: { joint = new MouseJoint((MouseJointDef)def); } break; case JointType.e_prismaticJoint: { joint = new PrismaticJoint((PrismaticJointDef)def); } break; case JointType.e_revoluteJoint: { joint = new RevoluteJoint((RevoluteJointDef)def); } break; case JointType.e_pulleyJoint: { joint = new PulleyJoint((PulleyJointDef)def); } break; case JointType.e_gearJoint: { joint = new GearJoint((GearJointDef)def); } break; case JointType.e_wheelJoint: { joint = new WheelJoint((WheelJointDef)def); } break; case JointType.e_weldJoint: { joint = new WeldJoint((WeldJointDef)def); } break; case JointType.e_frictionJoint: { joint = new FrictionJoint((FrictionJointDef)def); } break; case JointType.e_ropeJoint: { throw new NotImplementedException(); //joint = new RopeJoint((RopeJointDef)def); } break; case JointType.e_motorJoint: { joint = new MotorJoint((MotorJointDef)def); } break; default: Utilities.Assert(false); break; } return joint; }
internal static Joint Create(JointDef def) { Joint joint = null; switch (def.type) { case JointType.e_distanceJoint: { joint = new DistanceJoint((DistanceJointDef)def); } break; case JointType.e_mouseJoint: { joint = new MouseJoint((MouseJointDef)def); } break; case JointType.e_prismaticJoint: { joint = new PrismaticJoint((PrismaticJointDef)def); } break; case JointType.e_revoluteJoint: { joint = new RevoluteJoint((RevoluteJointDef)def); } break; case JointType.e_pulleyJoint: { joint = new PulleyJoint((PulleyJointDef)def); } break; case JointType.e_gearJoint: { joint = new GearJoint((GearJointDef)def); } break; case JointType.e_wheelJoint: { joint = new WheelJoint((WheelJointDef)def); } break; case JointType.e_weldJoint: { joint = new WeldJoint((WeldJointDef)def); } break; case JointType.e_frictionJoint: { joint = new FrictionJoint((FrictionJointDef)def); } break; case JointType.e_ropeJoint: { throw new NotImplementedException(); //joint = new RopeJoint((RopeJointDef)def); } break; case JointType.e_motorJoint: { joint = new MotorJoint((MotorJointDef)def); } break; default: Utilities.Assert(false); break; } return(joint); }