internal DigitalRuneFixedJoint(FixedJointDescriptor descriptor) { WrappedFixedJoint = new FixedJoint(); #region set RigidBodies if (!(descriptor.RigidBodyA is RigidBody)) throw new ArgumentException(String.Format("The type of the property 'RigidBodyA' must be '{0}'.", typeof(RigidBody))); WrappedFixedJoint.BodyA = ((RigidBody)descriptor.RigidBodyA).WrappedRigidBody; _rigidBodyA = descriptor.RigidBodyA; if (!(descriptor.RigidBodyB is RigidBody)) throw new ArgumentException("The type of the property 'RigidBodyB' must be 'System.Physics.DigitalRune.RigidBody'."); WrappedFixedJoint.BodyB = ((RigidBody)descriptor.RigidBodyB).WrappedRigidBody; _rigidBodyB = descriptor.RigidBodyB; #endregion WrappedFixedJoint.AnchorPoseALocal = descriptor.AnchorPoseALocal.ToDigitalRune(); WrappedFixedJoint.AnchorPoseBLocal = descriptor.AnchorPoseBLocal.ToDigitalRune(); Descriptor = descriptor; }
public static IFixedJoint CreateFixedJoint(this IFactory<IConstraint> factory, FixedJointDescriptor descriptor) { return factory.Create<IFixedJoint, FixedJointDescriptor>(descriptor); }
public DefaultFixedJoint(FixedJointDescriptor descriptor) { Descriptor = descriptor; }