Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLInterpolatorNodeType

All Superinterfaces:
FrameStateListener, VRMLChildNodeType, VRMLNode, VRMLNodeType
All Known Implementing Classes:
BaseInterpolatorNode

public interface VRMLInterpolatorNodeType
extends VRMLChildNodeType

Interpolator nodes are designed for linear keyframed animation.

Interpolators are driven by an input key ranging [0..1] and produce corresponding piecewise-linear output functions.

This interface represents the X3D abstract node type X3DInterpolatorNode, which is defined as:

  X3DInterpolatorNode : X3DChildNode {
    SFFloat      [in]     set_fraction       (-inf,inf)
    MFFloat      [in,out] key           []   (-inf,inf)
    MF     [in,out] keyValue      []
    SFNode       [in,out] metadata      NULL [X3DMetadataObject]
    [S|M]F [out]    value_changed
  }
 

Version:
$Revision: 1.5 $
Author:
Alan Hudson

Method Summary
 float getFraction()
          Get the current value of the fraction field.
 float[] getKey()
          Get current value of the key field.
 int getNumKey()
          Get the number of valid keys defined for this interpolator.
 void setFraction(float fraction)
          Set a new value for the fraction field.
 void setKey(float[] keys, int numValid)
          Set a new value for the key field.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, getFieldValue, getMetadataObject, getRefCount, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
 
Methods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
 
Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener
allEventsComplete
 

Method Detail

setFraction

public void setFraction(float fraction)
Set a new value for the fraction field. This should cause an output interpolation.

Parameters:
fraction - The new value for fraction

getFraction

public float getFraction()
Get the current value of the fraction field.

Returns:
The current value for fraction

setKey

public void setKey(float[] keys,
                   int numValid)
Set a new value for the key field. A value of null will delete all key values.

Parameters:
keys - The new key values
numValid - The number of valid values to copy from the array

getKey

public float[] getKey()
Get current value of the key field. If no keys exist a zero-length float[] will be returned. Use getNumKey to find out how many keys need to be set.

Returns:
The current key values

getNumKey

public int getNumKey()
Get the number of valid keys defined for this interpolator.

Returns:
a value >= 0

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium