8.7 Morphjava.lang.Object  +−−javax.media.j3d.SceneGraphObject  +−−javax.media.j3d.Node  +−−javax.media.j3d.Leaf  +−−javax.media.j3d.Morph The Morph Node is similar to a normal Shape3D Node except that is can have multiple GeometryArray objects associated with it. You can therefore put four versions of the same geometry into a Morph object and progressively morph between them by adjusting the weights associated with each GeometryArray. Table 8.2 shows the coordinates for the first point from four GeometryArrays, along with the weight for each. First, each coordinate is multiplied by the weight of its GeometryArray, and then the sum of all weighted coordinates is taken as the resulting coordinate. Table 8.2 Example of morphing using four weighted points
Note that the sum of the GeometryArray weights should equal 1. As you would expect, there has to be a one−to−one correspondence between the points in each GeometryArray. There is no feature information, so Java 3D merely uses the indices of each coordinate in the array to compute the resulting coordinates. In addition, all the GeometryArrays must have the same vertex format, the GeometryArrays must be of the same type, and must have comparable texture coordinate specifications. Please refer to the Sun Java 3D Morphing example to see the Morph Node in action.
