I am thinking of a couple of ways of creating Joints. I just want your opinions on em (or more suggestions):
Thought 1:
Creating a single class named "Joint" whereby the constructor takes an argument on which type of Joint this is…And process is this way.
Then have multiple classes with only public final static variables on there so that you can access them from the Joint. So a typical Constructor would be:
Joint j = new Joint(JointHinge2.TYPE);
j.setParameter(JointHinge2.SomeVariableForODE, 3f);
.....etc
Thought 2:
Have an abstract class Joint which has setter and getter methods for:
Also, the second design doesnt' allow for type changes. It just an easy way to store and then later retrieve them from an arraylist without instanceof calls.
With the first idea, its just another way to set paramters. Also, you only ever have to do deal with one "solid" object and its interface stays the same. With thought 2, you would have to know the method name to set this parameter...etc