X3D Example Archives: Conformance Nist, Interpolators, Position Interpolator

 

PositionInterpolator generates a series of 3-tuple SFVec3f values. Authors can ROUTE value_changed output events to a Transform node's translation field or another SFVec3f field.

X3D Tooltips of interest: PositionInterpolator.

X3D Specification sections of interest: 19 Interpolation component, 19.2 Concepts and 19.4.7 PositionInterpolator.

X3D Examples Archives of related interest:

 
  5 X3D Models       X3D Model Descriptions
   hierarchy hierarchy Test of a PositionInterpolator node to continue to generate and receive events when outside the Transform hierarchy. A Switch node is the parent of a PositionInterpolator node that moves a Box along the X, Y and Z axis. The PositionInterpolator has been "switched out" by setting the whichChoice field to -1. The result should be, the PositionInterpolator should continue send and receive events, and animate the movement of the Box.
   keys1000 keys 1000 Test of minimum conformance requirement of 1000 key/keyValue pairs for a PositionInterpolator. 1000 positions are linearly interpolated for 1000 keys, with the positions moving from 0 0 0 to -1 0 0 to 0 0 0 to 1 0 0 to 0 0 0 in X, 0 0 0 to 0 -1 0 to 0 0 0 to 0 1 0 to 0 0 0 in Y, 0 0 0 to 0 0 -1 to 0 0 0 to 0 0 1 to 0 0 0 in Z This takes place over 1000 keyFrames. The result should be: The Box geometry moves left, center right, center, down, center up, center, back, center forward to center in a 5 second inteval.
   samekeys samekeys Test keys with same value. A PositionInterpolator node is used to change the position of a Box geometry. The fraction_changed field of a TimeSensor node is used to change the position from keyValues of 0 0 0, -2 0 0, 0 0 0, 2 0 0, 0 0 0, 0 0 2, 0 0 -2, 0 0 0, 0 2 0, 0 0 0, 0 -2 0, 0 0 0 for keys of 0.08, 0.16, 0.24, 0.32, 0.5, 0.5, 0.5, 0.5, 0.68, 0.76, 0.84, 0.92 respectively. Because key 0.5 has multiple keyValues, only the first and last 0.5 key are used as limits. As a result: the Box geometry will move successively in the X direction, NOT move in the Z direction, then finish movement in the Y direction to in a 5 second interval.
   simple simple Test of basic PositionInterpolator functionality. A PositionInterpolator node is used to change the position of a Box geometry. The fraction_changed field of a TimeSensor node is used to change the position from keyValues of [ 0 0 0, -2 0 0, 0 0 0, 2 0 0, 0 0 0, 0 2 0, 0 -2 0, 0 0 0, 0 0 -2, 0 0 2, 0 0 0 ] for keys of [ [0.0, 0.08, 0.16, 0.24, 0.32, 0.40, 0.48, 0.56, 0.64, 0.72, 0.80, 0.88, 0.96] respectively. As a result: the Box geometry will move successively to those 13 positions in a 5 second interval.
   value_changed value changed Test of a PositionInterpolators ability to set its initial "value_changed" field to the correct value prior to receiving any events. Two PositionInterpolator node are associated with two seperate Box geometry. The PositionInterpolator associated with the Box on the left has a keyValue of 0 0 -4, while the PositionInterpolator associated with the right Box has the default of no keyValues, or [ ]. As a result, the PositionInterpolator on the left should initialize its "value_changed" field to the value of its first keyValue, or 0 0 4. Because no keyValues are provided to the right PositionInterpolator, it should initialize its "value_changed" field to the SFVec3f default value of 0 0 0. A Script node reads this value for each PositionInterpolator, and will translate the associated Box by a value equal to its initially read "value_changed" SFVec3f value when the geometry is indicated by the pointing device. When the pointing device passes over the left Box, it should translate by a value of 0 0 4 (move forward) each time it is indicated,then return to its original position when no longer indicated. When the pointing device passes over the right Box, it should translate to a value of 0 0 0 (it should NOT MOVE).

The X3D Resources: Examples page and Savage Developers Guide provide more information about the production of this archive.