This document is part of a collection of VRML2.0 history at http://www.mitra.biz/vrml/vrml2/mw_history.html

This is adapted from SGI's proposal.
Mitra <mitra@mitra.biz>, 2 Dec 95.

This proposal has not yet been edited to be consistent with the behaviors proposal

Interpolators : animation

Interpolators are nodes that are useful for doing keyframed animation. Given a sufficiently powerful scripting language, all of these interpolators could be implemented using Logic nodes (browsers might choose to implement these as pre-defined prototypes of appropriately defined Logic nodes). We believe that keyframed animation will be common enough to justify the inclusion of these classes as built-in types:

Issue: do we want to do automatic SF/MF type conversion? Or define different interpolators?

RotationInterpolator

This node interpolates among a set of SFRotation values. The values field must contain exactly as many rotations as there are keyframe times in the keys field, or an error will be generated and results will be undefined.

FILE FORMAT/DEFAULTS
     RotationInterpolator {
          keys            [ ]       # MFFloat
          values          [ ]       # MFRotation
          # eventIn  SFFloat    setAlpha
          # eventOut SFRotation outValue
     }

FloatInterpolator

This node interpolates among a set of SFFloat values. The values field must contain exactly as many numbers as there are keyframe times in the keys field, or an error will be generated and results will be undefined.

FILE FORMAT/DEFAULTS
     FloatInterpolator {
          keys            [ ] # MFFloat
          values          [ ] # MFFloat
          # eventIn  SFFloat    setAlpha
          # eventOut SFFloat    outValue
     }

ColorInterpolator

This node interpolates among a set of MFColor values, to produce MFColor outValue events. The number of colors in the values field must be an integer multiple of the number of keyframe times in the keys field; that integer multiple defines how many colors will be contained in the outValue events. For example, if 7 keyframe times and 21 colors are given, each keyframe consists of 3 colors; the first keyframe will be colors 0,1,2, the second colors 3,4,5, etc. The values are interpolated in RGB space.

The description of MF values in and out belongs in the general interpolator section above, or maybe we should split up the interpolators into single-valued and multi-valued sections.

FILE FORMAT/DEFAULTS
     FloatInterpolator {
          keys            0 # MFFloat
          values          0 # MFColor
          # eventIn  SFFloat    setAlpha
          # eventOut MFColor    outValue
     }

PositionInterpolator

This node interpolates among a set of Vec3f values, doing linear interpolation. This would be appropriate for interpolating a translation of a transformation.

FILE FORMAT/DEFAULTS
     PositionInterpolator {
          keys            0 # MFFloat
          values          0 # MFVec3f
          # eventIn  SFFloat    setAlpha
          # eventOut SFVec3f    outValue
     }

CoordinateInterpolator

This node interpolates among a set of multiple-valued Vec3f values, doing linear interpolation. This would be appropriate for interpolating vertex positions to do a geometric morph.

The number of colors in the values field must be an integer multiple of the number of keyframe times in the keys field; that integer multiple defines how many colors will be contained in the outValue events.

FILE FORMAT/DEFAULTS
     PositionInterpolator {
          keys            0 # MFFloat
          values          0 # MFVec3f
          # eventIn  SFFloat    setAlpha
          # eventOut MFVec3f    outValue
     }

NormalInterpolator

This node interpolates among a set of Vec3f values, suitable for transforming normal vectors.

The number of colors in the values field must be an integer multiple of the number of keyframe times in the keys field; that integer multiple defines how many colors will be contained in the outValue events.

FILE FORMAT/DEFAULTS
     VectorInterpolator {
          keys            0 # MFFloat
          values          0 # MFVec3f
          # eventIn  SFFloat    setAlpha
          # eventOut SFVec3f    outValue
     }

Need to add way to interpolate value of a Switch...