This major update overhauls the org.dyn4j.dynamics.joint package. This update allows the creation of new joints with an arbitrary number of bodies (whereas only one-body or two-body joints were possible before). This release sees all joints inherit from standard interfaces for things like limits, motors, and springs with the intent to make the API surface identical among all the joints.
A major change from previous versions are the settings for motors and springs. Before, you would disable these features by setting their values to zero or some default value. Now, these features are enabled/disabled using specific set{feature}Enabled methods. You can still set those settings to zero/defaults, which effectively disables them, but you lose the original value. For example, if you want your spring stiffness to be 10.0 and you want to toggle it on or off based on user interaction, you have to store the 10.0 somewhere, then set it to zero to disable the spring, then set it back to 10.0 to re-enable the spring with the correct value. These new methods allow you to set it to 10.0 and then toggle the behavior on/off separately.
Another major change from previous versions is on the WheelJoint and PrismaticJoint. These joints have had their body arguments reversed so that the given axis of allowed motion is fixed to the first body rather than the second. This shouldn’t impact existing code too much, but generally you’d need to reverse the first and second body and potentially negate the axis you had before.
Apart from these breaking changes, many of the joints see new features to help reduce the number of joints between bodies to achieve a desired effect. For example, before you would need to use both a WeldJoint and a RevoluteJoint if you wanted an angular spring with limits - this is now possible with only a WeldJoint. Another example is if you wanted a linear spring with prismatic motion, you’d need to use both a PrismaticJoint and a DistanceJoint - now you can just use the PrismaticJoint.
The class documentation for all joints has been revised to be clearer and reflect all the changes described above.
As always with a major release, all deprecated APIs have been removed.
See the release notes for all the detail.