Table of Contents Previous Chapter Details Viewpoint Slideshow Next Chapter Details X3D Resources

X3D Example Archives: Conformance Nist, Interpolators, Coordinate Interpolator

X3D Scenes Descriptions
1000keys Test minimum conformance requirement of 1000 key/keyValue pairs for a CoordinateInterpolator node. 1000 sets (each set consisting of the 8 vertices of a cube) of coordinate keys are matched to a linear set of keyframes from 0 to 1. Each coordinate set expands the cube from a volume of 0 to a size of 2 2 2, then back to 0, in a 5 second interval.
hierarchy Test of a CoordinateInterpolator node to continue to generate and receive events when outside the Transform hierarchy. A Switch node is the parent of a CoordinateInterpolator node that changes the shape of an IndexedFaceSet geometry. The CoordinateInterpolator has been "switched out" by setting the whichChoice field to -1. The result should be, the CoordinateInterpolator should continue send and receive events, and animate the shape of the geometry. The geometry should stretch along the X, Y and Z axex.
samekeys Test keys with same value. A CoordinateInterpolator node is used to change the coordinate location at each vertex on a rectangular shaped IndexedFaceSet. The fraction_changed field of a TimeSensor node is used to control the keyframe animation of the normals. The keys for the CoordinateInterpolator are set to values [ 0, 0.25, 0.5, 0.5, 0.5, 0.75, 1.0 ], and the keyValues for the 8 vertices are set to [ -1 1 1, -1 -1 1, 1 1 1, 1 -1 1, 1 1 -1, 1 -1 -1, -1 1 -1, -1 -1 -1 -2 1 1, -2 -1 1, 2 1 1, 2 -1 1, 2 1 -1, 2 -1 -1, -2 1 -1, -2 -1 -1 -1 1 1, -1 -1 1, 1 1 1, 1 -1 1, 1 1 -1, 1 -1 -1, -1 1 -1, -1 -1 -1 -1 1 2, -1 -1 2, 1 1 2, 1 -1 2, 1 1 -2, 1 -1 -2, -1 1 -2, -1 -1 -2 -1 1 1, -1 -1 1, 1 1 1, 1 -1 1, 1 1 -1, 1 -1 -1, -1 1 -1, -1 -1 -1 -1 2 1, -1 -2 1, 1 2 1, 1 -2 1, 1 2 -1, 1 -2 -1, -1 2 -1, -1 -2 -1 -1 1 1, -1 -1 1, 1 1 1, 1 -1 1, 1 1 -1, 1 -1 -1, -1 1 -1, -1 -1 -1 ] Because the three middel keys have the same value, the first and last identical key should serve as a limit for that key, and should result in the geometry expanding along the X axis, return to its original shape, then expand along the Y axis, then return to its original shape, in a 5 second time interval. The geometry should NOT expand along the Z axis.
simple Test of basic functionality. A CoordinateInterpolator node is used to continuously change the coordinate location at each vertex on a rectangular shaped IndexedFaceSet. The fraction_changed field of a TimeSensor node is used to control the keyframe animation of the normals. The keys for the NormalInterpolator are set to values [ 0, 0.17, 0.34, 0.51, 0.68, 0.86, 1.0 ], and the keyValues for the 8 vertices are set to [ -1 1 1, -1 -1 1, 1 1 1, 1 -1 1, 1 1 -1, 1 -1 -1, -1 1 -1, -1 -1 -1 -2 1 1, -2 -1 1, 2 1 1, 2 -1 1, 2 1 -1, 2 -1 -1, -2 1 -1, -2 -1 -1 -1 1 1, -1 -1 1, 1 1 1, 1 -1 1, 1 1 -1, 1 -1 -1, -1 1 -1, -1 -1 -1 -1 1 2, -1 -1 2, 1 1 2, 1 -1 2, 1 1 -2, 1 -1 -2, -1 1 -2, -1 - 1 -2 -1 1 1, -1 -1 1, 1 1 1, 1 -1 1, 1 1 -1, 1 -1 -1, -1 1 -1, -1 -1 -1 -1 2 1, -1 -2 1, 1 2 1, 1 -2 1, 1 2 -1, 1 -2 -1, -1 2 -1, -1 -2 -1 -1 1 1, -1 -1 1, 1 1 1, 1 -1 1, 1 1 -1, 1 -1 -1, -1 1 -1, -1 -1 -1 ] This should result in a continuous change in the coordinate location of each vertex, such that the geometry appears to stretch along the X axis, return to its original size, stretch along the Z axis, return to its original size, then stretch vertically, then again return to its original size, all in a 5 second cycle.
value changed Test of a CoordinateInterpolators ability to load the correct keyValue into its "value_changed" field prior to receiving any events. Two CoordinateInterpolator node are associated with two seperate IndexedFaceSet geometry. The CoordinateInterpolator associated with the IndexedFaceSet on the left has keyValues that create a box shape that is twice its initial size, while the CoordinateInterpolator associated with the right Box has the default of no keyValues, or [ ]. As a result, the CoordinateInterpolator on the left should initialize its "value_changed" field to the value of its first keyValue when the pointing device indicates the box, and the box should appear to double in size while it is indicated by the pointing device. Because no keyValues are provided to the right CoordinateInterpolator, it should initialize its "value_changed" field to the MFVec3f default value of an empty MFVec3f field. Passing the pointing device over the right box should not result in any change in the size of the box. Michael Kass

Online at http://www.web3d.org/x3d/content/examples/ConformanceNist/Interpolators/CoordinateInterpolator

Master source code archive is under subversion control at
http://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/ConformanceNist/Interpolators/CoordinateInterpolator

Table of Contents Previous Chapter Details Viewpoint Slideshow Next Chapter Details X3D Resources

Also available: current and archived nightly builds and distributions of these examples, all published under an Open-Source License.

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