← Users | Developers → | |||||||||||||||||||
Intro | News | view3dscene | The Castle | All Programs | Forum | Donate | Engine | VRML/X3D | Blender |
Interpolation componentThis component defines nodes to interpolate between a given set of values. Interpolators are often used for animation, receiving time values from TimeSensor and sending interpolated values to visible nodes. Contents: 1. SupportSupported nodes:
TODO: EaseInEaseOut, Spline*, SquadOrientationInterpolator missing. 2. Extension: ColorSetInterpolatorAs an extension, we add the ColorSetInterpolator node, that generates MFColor values. ColorSetInterpolator : X3DInterpolatorNode { SFNode [in,out] metadata NULL # [X3DMetadataObject]; defined by X3DNode SFFloat [in] set_fraction # defined by X3DInterpolatorNode MFFloat [in,out] key [] # defined by X3DInterpolatorNode MFColor [in,out] keyValue [] MFColor [out] value_changed } The number of items in the "keyValue" field should be a multiple of the number of items in the "key" field, that is keyValue.count = key.count * singleValueChangedCount. When the "set_fraction" input event is received, we linearly interpolate the colors, and the "value_changed" event is generated with a set of singleValueChangedCount colors. This works and looks exactly like other interpolation nodes. It is similar to CoordinateInterpolator, but generates colors. It is similar to ColorInterpolator, but generates many values. Colors are interpolated in HSV space. Useful to interpolate e.g. Background.skyColor values, or Color.color values. 3. Extension: VectorInterpolatorAs an extension, we add the VectorInterpolator node, that generates MFFloat values. This is compatible with InstantReality. VectorInterpolator : X3DInterpolatorNode { SFNode [in,out] metadata NULL # [X3DMetadataObject]; defined by X3DNode SFFloat [in] set_fraction # defined by X3DInterpolatorNode MFFloat [in,out] key [] # defined by X3DInterpolatorNode MFFloat [in,out] keyValue [] MFFloat [out] value_changed } The number of items in the "keyValue" field should be a multiple of the number of items in the "key" field, that is keyValue.count = key.count * singleValueChangedCount. When the "set_fraction" input event is received, we linearly interpolate the floats, and the "value_changed" event is generated with a set of singleValueChangedCount floats. Useful to interpolate e.g. by ElevationGrid.set_height. |