< Zurück | Inhalt | Weiter >

12.1 The Interpolator class












Java 3D includes a rich set of behaviors for interpolating an object between states. These behaviors are important for many animation and visualization applications and are covered in detail in this section. Interpolator behaviors can be used to interpolate an object’s:

Color—Linearly between diffuse material colors

Path—Position along a specified path

Position—Linearly between positions

Rotation—Linearly between rotations

Scale—Linearly between scale values

Switch value—Toggle Switch Node’s visible child based on time

Spline path—Position along a specified spline path

Transparency—Linearly between transparency values

All the Interpolation classes require an Alpha object. The Alpha class is used to convert the current time to a value between 0 and 1—this value is then used by the Interpolator to perform its specific action. The Alpha class is described in section 12.2.