Specifications
Developers guidelines | 3D graphics with Java ME
23 June 2010
3D object information. Various attributes, such as the object shading type, can be
associated with an instance of this class. Other associations specify operations such
as rotation, scaling, or motion. Command lists can also be attached to each instance
of Figure.
Besides simplifying the design of a 3D model, object import also provides two other
significant advantages to the developer. First, it reduces the computational overhead
of updating a 3D scene. Computations are not required to generate the 3D object itself.
Instead, any rendering or transformation operations are applied directly to the polygon
information maintained by the instance of Figure.
Second, the Figure class helps implement animation effects for a model. The current
arrangement of 3D objects in a model represents a pose. An action description class,
ActionTable, is associated with the Figure and stores motions that change the
model pose. The action tables animate the model by changing its pose over time under
program control. ActionTables are also imported from a JAR resource.
As a consequence, not only can a 3D authoring program be used to generate 3D
objects, the program can also animate them. HI Corporation offers plug-ins for several
popular 3D modeling programs that export both the model geometry and animation
sequence information into a file format that the Micro3D Ver.3 engine can read. For
more information on the plugins and tools, see “Getting started” on page 29.
Figures can be drawn immediately or rendered, that is, all transformations and
effects are processed, but the actual generation of pixel data is deferred until a flush
command executes. This allows mimicing a 3D retained mode by first arranging and
updating the Figure objects of a scene, and then performing a flush graphics
command. The main reason for "retaining" the rendering commands is that all
rendered figures then can be automatically sorted by depth (Z-sorting).
Note that Micro3D Ver.3 does not support the grouping of Figures into leafs and
nodes that could assemble a graphics "world", which is a feature of retained mode
operation. However, the rendering scheme is suitable for most 3D operations.
Micro3D Ver.3 classes
The Micro3D Ver.3 API consists of ten classes used to manage the display and control
of 3D content. Some of these classes store object information – like the Figure class
introduced above – while others attach attributes to instances of these objects. Other
classes describe the lighting and textures used in a scene. One class handles all
rendering operations, while a utility class provides methods that can help with the
design of graphics algorithms. The table below provides a brief summary of these
classes.
Class Description
ActionTable Stores the action data that controls the movement of an associated 3D
model. Action table data can be read from a JAR resource
AffineTrans Handles the matrix math used to scale or move a 3D object