Finally fixed the rotation animation bug.  Some exporters export
OrientationInterpolators that have axis of rotations that change between
frames.  The current VRML loader was not handling them correctly.  That's
been fixed.

Example problem:

  DEF Box01-ROT-INTERP OrientationInterpolator {
    key [0, 0.03, 0.06, 0.09, 0.12, 0.15, 0.18, 0.21, 0.24, 0.27, 0.3,
        0.33, 0.36, 0.39, 0.42, 0.45, 0.48, 0.51, 0.54, 0.57, 0.6,
        0.63, 0.66, 0.69, 0.72, 0.75, 0.78, 0.81, 0.84, 0.87, 0.9,
        0.93, 0.96, 0.99, 1, ]
    keyValue [
        1 0 0 0,
        0 1 0 -0.0942478,       0 1 0 -0.188496,
        0 1 0 -0.282743,        0 1 0 -0.376991,
        0 1 0 -0.471239,        0 1 0 -0.565487,
        0 1 0 -0.659734,        0 1 0 -0.753982,
        0 1 0 -0.84823,         0 1 0 -0.942478,
        0 1 0 -1.03673,                 0 1 0 -1.13097,
        0 1 0 -1.22522,                 0 1 0 -1.31947,
        0 1 0 -1.41372,                 0 1 0 -1.50796,
        0 1 0 -1.60221,                 0 1 0 -1.69646,
        0 1 0 -1.79071,                 0 1 0 -1.88496,
        0 1 0 -1.9792,          0 1 0 -2.07345,
        0 -1 0 -4.11549,                0 -1 0 -4.02124,
        0 -1 0 -3.92699,                0 -1 0 -3.83274,
        0 -1 0 -3.7385,         0 -1 0 -3.64425,
        0 -1 0 -3.55,           0 -1 0 -3.45575,
        0 -1 0 -3.3615,         0 -1 0 -3.26726,
        0 -1 0 -3.17301,                0 -1 0 -3.14159,
      ] },

Inthis code fragment the axis of rotation(first three nums) changes between
frames.  This is legal VRML, but didn't work correctly.

The fix was todo the interpolations using Quaternions.  Probably where the
data came from in the first place.  Attached is the fixed code.

-Alan

OrientationInterpolator.java

Reply via email to