@@ -25,11 +25,13 @@ Box2DX Copyright (c) 2009 Ihar Kalasouski http://code.google.com/p/box2dx
2525// SOFTWARE.
2626*/
2727
28+ using System ;
2829using System . Numerics ;
2930using System . Runtime . CompilerServices ;
3031using Box2D . NetStandard . Common ;
3132using Box2D . NetStandard . Dynamics . Bodies ;
3233using Box2D . NetStandard . Dynamics . Joints . Distance ;
34+ using Box2D . NetStandard . Dynamics . Joints . Friction ;
3335using Box2D . NetStandard . Dynamics . Joints . Gear ;
3436using Box2D . NetStandard . Dynamics . Joints . Mouse ;
3537using Box2D . NetStandard . Dynamics . Joints . Prismatic ;
@@ -192,16 +194,18 @@ public static void AngularStiffness(
192194 internal static Joint Create ( JointDef def )
193195 {
194196 return def switch
195- {
196- DistanceJointDef d => new DistanceJoint ( d ) ,
197- MouseJointDef d => new MouseJoint ( d ) ,
198- PrismaticJointDef d => new PrismaticJoint ( d ) ,
199- RevoluteJointDef d => new RevoluteJoint ( d ) ,
200- PulleyJointDef d => new PulleyJoint ( d ) ,
201- GearJointDef d => new GearJoint ( d ) ,
202- WheelJointDef d => new WheelJoint ( d ) ,
203- WeldJointDef d => new WeldJoint ( d )
204- } ;
197+ {
198+ DistanceJointDef d => new DistanceJoint ( d ) ,
199+ MouseJointDef d => new MouseJoint ( d ) ,
200+ PrismaticJointDef d => new PrismaticJoint ( d ) ,
201+ RevoluteJointDef d => new RevoluteJoint ( d ) ,
202+ PulleyJointDef d => new PulleyJoint ( d ) ,
203+ GearJointDef d => new GearJoint ( d ) ,
204+ WheelJointDef d => new WheelJoint ( d ) ,
205+ WeldJointDef d => new WeldJoint ( d ) ,
206+ FrictionJointDef d => new FrictionJoint ( d ) ,
207+ _ => throw new NotImplementedException ( $ "JointDef '{ def . GetType ( ) . Name } ' is not implemented.")
208+ } ;
205209 }
206210
207211 internal abstract void InitVelocityConstraints ( in SolverData data ) ;
0 commit comments