Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

3. Node descriptions > 3.9. CoordinateInterpolator2D node - Pg. 218

218 C H A P T E R 7 Event Animation and Interpolation 3.9. CoordinateInterpolator2D node The CoordinateInterpolator2D node generates multiple 2-vector values (MFVec2f) over time. CoordinateInterpolator2D is typically driven using a TimeSensor's fraction output sent as an input-time event and then computed from the piecewise-linear key and keyValue function. The generated output value is linearly interpolated by the node, first by determining the fractional difference between the nearest elements of the key array and then approximating the same amount between the corresponding elements of the keyValue array. The CoordinateInterpolator2D node is in the Full profile. The node has the fields defined in Table 7.22. Node syntax is shown in Table 7.23. 3.9.1. key and keyValue The key field is an MFFloat array of input bounds, and the keyValue field is a corresponding MFVec2f array of output 2-tuple values. 3.9.2. Hints and warnings Ensure that value_changed is connected via a ROUTE to a target field of type MFVec2f. Ensure that the total number of keyValue floats equals the quantity (key size) × (length of array in target field).