iicm.vrml.pw
Class Interpolator

java.lang.Object
  extended by iicm.vrml.pw.Node
      extended by iicm.vrml.pw.Interpolator
All Implemented Interfaces:
GotEventCallback
Direct Known Subclasses:
ColorInterpolator, CoordinateInterpolator, NormalInterpolator, OrientationInterpolator, PositionInterpolator, ScalarInterpolator

public abstract class Interpolator
extends Node
implements GotEventCallback

Interpolator base class


Field Summary
private  int interNo_
           
private  float[] value
           
 
Fields inherited from class iicm.vrml.pw.Node
DEF_KEYWORD, EXTERNPROTO_KEYWORD, fieldIScontent, newISname, newISnum, objname, PROTO_KEYWORD, ROUTE_KEYWORD, SCRIPT_KEYWORD, subfields, USE_KEYWORD, userdata
 
Constructor Summary
Interpolator()
           
 
Method Summary
 void gotEventCB(Field field, double timestamp)
           
(package private) abstract  Field interpolate()
          derived class will call interpolateFloatvalues with appropriate arguments.
(package private)  void interpolateFloatvalues(float fraction, float[] keys, int lenKeys, float[] keyvals, int lenKVals, float[] value, int valsperkey)
          calculates the next interpolation-step.
(package private)  void linearInterpolation(float frac, float key1, float key2, float[] val, int offs, float[] value, int valsperkey)
          linear interpolation of valsperkey values. fraction frac lies between key1 and key2.
 
Methods inherited from class iicm.vrml.pw.Node
addField, addRoute, atCurrLine, createInstanceFromName, deleteRoute, getEvent, nodeName, readFields, readNode, readNodeBody, readNodeBody, tab, traverse, traverseNode, writeNode, writeSubfield, writeSubfields, writeX3dISfields, writeX3dNode, writeX3dNode, writeX3dNode, writeX3dSubfield, writeX3dSubfields, writeX3dSubfields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interNo_

private int interNo_

value

private float[] value
Constructor Detail

Interpolator

public Interpolator()
Method Detail

linearInterpolation

void linearInterpolation(float frac,
                         float key1,
                         float key2,
                         float[] val,
                         int offs,
                         float[] value,
                         int valsperkey)
linear interpolation of valsperkey values. fraction frac lies between key1 and key2. out: valsperkey interpolated values starting from index offs * valsperkey.


interpolate

abstract Field interpolate()
derived class will call interpolateFloatvalues with appropriate arguments.

Returns:
field to which event should be sent (values changed) or null, if there are no event receivers.

interpolateFloatvalues

void interpolateFloatvalues(float fraction,
                            float[] keys,
                            int lenKeys,
                            float[] keyvals,
                            int lenKVals,
                            float[] value,
                            int valsperkey)
calculates the next interpolation-step. searches fraction in keys[] and sets value[] (valsperkey elements) to the according interpolated values out of keyvals (groups of valsperkey elements each). caller must ensure that value[] is large enough may hold valsperkey elements


gotEventCB

public void gotEventCB(Field field,
                       double timestamp)
Specified by:
gotEventCB in interface GotEventCallback