Patch for saving acceleration, velocity and min/max position of joint axis

Tested and verified.


Index: JointAxis.java
===================================================================
RCS file: /cvs/jmephysics/src/com/jmex/physics/JointAxis.java,v
retrieving revision 1.11
diff -u -r1.11 JointAxis.java
--- JointAxis.java   22 Sep 2007 14:28:37 -0000   1.11
+++ JointAxis.java   2 Mar 2008 00:14:09 -0000
@@ -225,9 +225,18 @@
     public static final String DIRECTION_PROPERTY = "direction";
     public static final String RELATIVE_TO_SECOND_OBJECT_PROPERTY = "relativeToSecondObject";
     public static final String JOINT_PROPERTY = "joint";
+    public static final String AVAILABLE_ACCELERATION_PROPERTY = "availableAcceleration";
+    public static final String DESIRED_VELOCITY_PROPERTY = "desiredVelocity";
+    public static final String POSITION_MAXIMUM_PROPERTY = "positionMaximum";
+    public static final String POSITION_MINIMUM_PROPERTY = "positionMinimum";
 
     public void read( JMEImporter im ) throws IOException {
         InputCapsule capsule = im.getCapsule( this );
+       
+        setAvailableAcceleration( capsule.readFloat(AVAILABLE_ACCELERATION_PROPERTY, 0.0f));
+        setDesiredVelocity( capsule.readFloat(DESIRED_VELOCITY_PROPERTY, 0.0f));
+        setPositionMaximum( capsule.readFloat(POSITION_MAXIMUM_PROPERTY, Float.POSITIVE_INFINITY));
+        setPositionMinimum( capsule.readFloat(POSITION_MINIMUM_PROPERTY, Float.NEGATIVE_INFINITY));
         setDirection( (Vector3f) capsule.readSavable( DIRECTION_PROPERTY, Vector3f.ZERO ) );
         setRelativeToSecondObject( capsule.readBoolean( RELATIVE_TO_SECOND_OBJECT_PROPERTY, false ) );
 
@@ -236,6 +245,11 @@
 
     public void write( JMEExporter ex ) throws IOException {
         OutputCapsule capsule = ex.getCapsule( this );
+       
+        capsule.write( getAvailableAcceleration(), AVAILABLE_ACCELERATION_PROPERTY, 0.0f);
+        capsule.write( getDesiredVelocity(), DESIRED_VELOCITY_PROPERTY, 0.0f);
+        capsule.write( getPositionMaximum(), POSITION_MAXIMUM_PROPERTY, Float.POSITIVE_INFINITY);
+        capsule.write( getPositionMinimum(), POSITION_MINIMUM_PROPERTY, Float.NEGATIVE_INFINITY);
         capsule.write( direction, DIRECTION_PROPERTY, Vector3f.ZERO );
         capsule.write( isRelativeToSecondObject(), RELATIVE_TO_SECOND_OBJECT_PROPERTY, false );
         capsule.write( getJoint(), JOINT_PROPERTY, null );

nice - thanks nymon! (committed)