Box2D.Dynamics.Joints.Joint.Create C# (CSharp) Метод

Create() публичный статический Метод

public static Create ( World argWorld, JointDef def ) : Joint
argWorld World
def JointDef
Результат Joint
        public static Joint Create(World argWorld, JointDef def)
        {
            //Joint joint = null;
            switch (def.Type)
            {

                case JointType.Mouse:
                    return new MouseJoint(argWorld.Pool, (MouseJointDef)def);

                case JointType.Distance:
                    return new DistanceJoint(argWorld.Pool, (DistanceJointDef)def);

                case JointType.Prismatic:
                    return new PrismaticJoint(argWorld.Pool, (PrismaticJointDef)def);

                case JointType.Revolute:
                    return new RevoluteJoint(argWorld.Pool, (RevoluteJointDef)def);

                case JointType.Weld:
                    return new WeldJoint(argWorld.Pool, (WeldJointDef)def);

                case JointType.Friction:
                    return new FrictionJoint(argWorld.Pool, (FrictionJointDef)def);

                //case JointType.WHEEL:
                //    return new WheelJoint(argWorld.Pool, (LineJointDef)def);

                //case JointType.GEAR:
                //    return new GearJoint(argWorld.Pool, (GearJointDef)def);

                case JointType.Pulley:
                    return new PulleyJoint(argWorld.Pool, (PulleyJointDef)def);

                case JointType.ConstantVolume:
                    return new ConstantVolumeJoint(argWorld, (ConstantVolumeJointDef)def);
            }
            return null;
        }