Motorola E680 Technical Manual - Page 32

camera and lighting setup. This view can be to the screen, to a MIDP image, or to

Page 32 highlights

The World object contains the objects that define a complete 3D scene - geometry, textures, lights, cameras, and animations. The World object mediates access to the objects within the world. It can be passed as a block to the renderer, the Graphics3D class. The Loader object, populates a World by loading an M3G file from a URI or other asset source, such as a buffer of bytes in M3G format. The Loader is not restricted to loading just Worlds, each file can contain as little as a single object and multiple files can be merged together on the device, or you can put everything into a single file. The rendering class Graphics3D (by analogy to the MIDP Graphics class) takes a whole scene (or part of a scene graph), and renders a view onto that scene using the current camera and lighting setup. This view can be to the screen, to a MIDP image, or to a texture in the scene for special effects. You can pass a whole world in one go (retained mode) or you can pass individual objects (immediate mode). There is only one Graphics3D object present at one time, so that hardware accelerators can be used. The following graphic shows the structure of a more typical MIDlet. 32

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107

32
The World object contains the objects that define a complete 3D scene - geometry,
textures, lights, cameras, and animations. The World object mediates access to the
objects within the world. It can be passed as a block to the renderer, the Graphics3D
class.
The Loader object, populates a World by loading an M3G file from a URI or other asset
source, such as a buffer of bytes in M3G format. The Loader is not restricted to loading
just Worlds, each file can contain as little as a single object and multiple files can be
merged together on the device, or you can put everything into a single file.
The rendering class Graphics3D (by analogy to the MIDP Graphics class) takes a whole
scene (or part of a scene graph), and renders a view onto that scene using the current
camera and lighting setup. This view can be to the screen, to a MIDP image, or to a
texture in the scene for special effects. You can pass a whole world in one go (retained
mode) or you can pass individual objects (immediate mode). There is only one
Graphics3D object present at one time, so that hardware accelerators can be used.
The following graphic shows the structure of a more typical MIDlet.