Motorola maxx V6 manual Draft Subject to Change 107/201, Animations

Models: maxx V6

1 201
Download 201 pages 31.32 Kb
Page 107
Image 107

Java ME Developer Guide

Chapter 13 - JSR-184 - Mobile 3D Graphics API

static void traverseDescendants(Object3D obj)

{

int numReferences = obj.getReferences(null);

if (numReferences > 0)

{

Object3D[] objArray = new Object3D[numReferences];

obj.getReferences(objArray);

for (int i = 0; i < numReferences; i++) traverseDescendants(objArray[i]);

}

}

Code Sample 7 Using the Object3D.getReferences().

Once you have an object, most of the properties on it can be modified using the M3G API. For example, you can change the position, size, orientation, color, brightness, or whatever other attribute of the object is important. You can also create and delete objects and insert them into the world, or link parts of other M3G files into the scene graph.

13.4.6 Animations

As well as controlling objects from code, scene designers can specify how objects should move under certain circumstances, and store this movement in 'canned' or block animation sequences that can be triggered from code. Many object properties are animatable, including position, scale, orientation, color and textures. Each of these properties can be attached to a sequence of keyframes using an Animation- Track. The keyframe sequence can be looped, or just played once, and they can be interpolated in several ways (stepwise, linear, spline).

A coherent action typically requires the simultaneous animation of several properties

DRAFT - Subject to Change [107/201]

Page 107
Image 107
Motorola maxx V6 manual Draft Subject to Change 107/201, Animations