Specifications

Developers guidelines | 3D graphics with Java ME
26 June 2010
application, where it is read by the Loader class. The Loader generates instances of
3D objects as it reads the resource. Entire scene graphs with animation, lighting, and
camera views can be imported and displayed.
Because the format of the .m3g file is an open standard, it enables 3D content to be
generated on high-end platforms, then readily imported or shared among a wide
variety of mobile platforms that implement JSR-184.
JSR-184 classes
Compared to Micro3D Ver.3, JSR-184 contains lots of classes, thirty in all, as in the
table below. The large number of classes increase the implementation firmware
footprint. The APIs have been designed to reduce RAM use by storing most objects by
reference, not by making new instances of them.
JSR-184 supports both retained and immediate modes of operation. The retained
mode uses scene graph that links all of the geometric objects in the 3D world via a
structured tree of nodes. Each node on the graph represents a geometric object and
carries information about its appearance, position in space, and how it behaves in
relation to other nodes. Objects subclassed from Node are used (such as Light,
Sprite, and Mesh objects) to assemble the 3D world. The Group class allows
gathering of unordered node objects together, and the World class defines a special
Group node that acts as the top-level container for all of the nodes in the 3D world. To
display a view of the 3D world using the retained mode, a Graphics3D render method
is executed on the World node.
Two classes, TriangleStripArray and VertexArray, serve as building blocks
from which more complex 3D objects and models can be assembled. Other
subclasses of Node, such as a Mesh, are also used to build more complex 3D
geometric objects. Other Node subclasses control the scene graph lighting and point
of view (Light and Camera, respectively). There are classes that define the visual
properties of a 3D object (Material, Fog, CompositingMode, and others) and they
can be used in either the immediate mode or retained mode.
A detailed description of these classes is out of the scope of this document. For more
information, consult the JSR-184 specification documentation at
http://www.jcp.org/en/jsr/detail?id=184
. The table below provides a brief summary.
Class Description
AnimationController Manages the location and speed of a collection of objects that comprise an
animation sequence.
AnimationTrack Contains the information that controls a single animation property on one
target object. Animation sequences consist of a set of AnimationTracks
handled by an AnimationController.
Appearance Stores the rendering attributes of a set of component objects. The attributes
describe material characteristics of each object, its polygons, how it is to be
blended into the scene, and any fog effects. It also specifies texture map
characteristics and the images involved.