[Abstract nodes.]

`#include <H3D/X3DInterpolatorNode.h>`

Inheritance diagram for H3D::X3DInterpolatorNode:

## Public Member Functions | |

X3DInterpolatorNode (Inst< SFNode > _metadata=0, Inst< SFFloat > _set_fraction=0, Inst< MFFloat > _key=0) | |

Constructor. | |

int | lookupKey (H3DFloat f, H3DFloat &w) |

Utility function for Interpolator nodes to be able to find the index for the key pair to interpolate between for a given fraction value f. | |

## Static Public Attributes | |

static H3DNodeDatabase | database |

The H3DNodeDatabase for this node. |

The key field contains the list of key times, which could appear as:

key [0 0.25 0.65 0.75 1]

to indicate there are five key frames in this node. The keyValue field contains values for the target field, one complete set of values for each key. Interpolator nodes containing no keys in the key field shall not produce any events. However, an input event that replaces an empty key field with one that contains keys will cause the interpolator node to produce events the next time that a set_fraction event is received..

The set_fraction inputOnly field receives an SFFloat event and causes the interpolator node function to evaluate, resulting in a value_changed output event of the specified type with the same timestamp as the set_fraction event.

The contents of the keyValue and value_changed fields are dependent on the type of the node (e.g., the PositionInterpolator fields use MFVec3f values). Each value or set of values in the keyValue field corresponds in order to the parameter value in the key field.

For interpolator nodes that produce a single value, results are undefined if the number of values in the key field is not the same as the number of values in the keyValue field.

For Interpolator nodes that produce multiple values, the keyValue field is an nxm array of values, where n is the number of values in the key field and m is the number of values at each key frame. Each m values in the keyValue field correspond, in order, to a parameter value in the key field. Each value_changed event shall contain m interpolated values. Results are undefined if the number of values in the keyValue field is not a positive integer multiple of the number of values in the key field.

If an X3DInterpolatorNode value_changed outputOnly field is read before it receives any inputs, keyValue[0] is returned if keyValue is not empty. If keyValue is empty (i.e., [ ]), the initial value for the respective field type is returned (EXAMPLE (0, 0, 0) for SFVec3f); see 5 Field type reference for initial event values.

The location of an X3DInterpolatorNode in the transformation hierarchy has no effect on its operation. For example, if a parent of an interpolator node is a Switch node with whichChoice set to 1 (i.e., ignore its children), the interpolator continues to operate as specified (receives and sends events).

A typical simplified structure for a key frame animation implementation involves a TimeSensor, ROUTEs, and the target node.

Transform { Shape IndexedFaceSet { coordIndex='... 1 ... > Coordinate DEF='Moved' point [ x y z, ... ] # t0Geometry

Utility function for Interpolator nodes to be able to find the index for the key pair to interpolate between for a given fraction value f.

The weighting of f between the key pair is set in w.

The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:31:27 2008 for H3D API by 1.5.7