Motorola MOTORAZR maxx V6 Developer's Manual page 107

Java me developer guide
Hide thumbs Also See for MOTORAZR maxx V6:
Table of Contents

Advertisement

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]);
}
}
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
Code Sample 7 Using the Object3D.getReferences().
[107/201]

Advertisement

Table of Contents
loading

Table of Contents