Introduction
PART I: Overview
Chapter 1: The Mobile 3D Graphics API
- Java on Mobile Devices
- Tailoring the Java Platform
- The Java Micro Edition
- Collection Standards
- M3G's Architecture
- M3G Feature Overview
- M3G's Pedigree
- Features in M3G 1.0
- What's New in M3G 1.1
- Additional Clarifications from the MSA
- The Future of M3G
- Alternatives to M3G
- Summary
Chapter 2: Hello, World!
- Developing a MIDlet
- MIDlet States
- Displaying Screens
- Drawing Graphics
- Receiving User Input
- Animating Your World
- Running Your Application on the Emulator
- The Build Process
- The Java Wireless Toolkit and the KToolbar
- Integrated Development Environments
- Downloading Your Application to the Phone
- Installing Over the Air
- Alternative Methods of Installation
- Summary
Chapter 3: Before You Start
- Getting to Know Your Device
- Does Your Phone Support M3G?
- Implementation-Specific M3G Properties
- Important MIDP Properties
- Key Layouts
- Programming for Different Devices
- Hardware Considerations
- Device Fragmentation
- Summary
PART II: 3D Fundamentals
Chapter 4: Rendering Geometric Objects
- Coordinate Systems
- 3D
- 2D
- Creating Meshes
- Mesh Overview
- Vertex Buffers and Arrays
- Building Geometry
- Polygon-Level Attributes
- Colors
- Immediate Mode Rendering
- Graphics3D
- Defining a Background
- Render Targets
- A Shapes Library
- Using Fractional Positions
- Cylinder and Sphere
- Bézier Surfaces
- Summary
Chapter 5: Transformations
- Transforming Vectors
- Transformation Matrices
- Homogeneous Coordinates
- Matrix Operations Using Transform
- Orientation Representations
- Stages of Vertex Transformation
- Modeling Transformations
- A Transformation Framework
- Translation
- Scaling
- Rotation
- Combining Transformations
- Generic Transformations
- Viewing Transformations
- Describing a Camera
- Switching Between Portrait and Landscape Mode
- Projection Transformations
- Setting the Viewing Volume
- Using Parallel and Perspective Projection
- The Viewport Transformation
- The Depth Buffer
- Using the Depth Buffer
- Depth Buffer Resolution
- Handling Transparent Objects
- Manually Transforming 3D Coordinates
- A Wireframe Engine
- Transforming 3D Coordinates
- Drawing Triangles
- Summary
Chapter 6: Textures
- Image2D
- Pixel Formats
- Creating Images
- Reading PNG Images
- Reading JPEG Images
- Using Textures
- Texture Mapping
- Creating Textures
- Working with Texture Coordinates
- Texture Quality
- Sprite3D
- Cheap Environment Mapping
- The Real Thing
- A Fast Alternative
- Applying Environment Mapping to Meshes
- Summary
Chapter 7: Blending and Transparency
- Compositing
- Fragment Tests
- Blending Modes
- Multi-Texturing
- Texture Blending
- Blending Modes
- Adding Fog for Realism
- Creating Fog
- Fog Modes
- Creating an Emboss Effect
- Creating the Emboss Image
- Embossing a Texture
- Using the Emboss Effect
- Summary
Chapter 8: Lighting
- Lighting in M3G
- M3G's Lighting Model
- Finding Normals
- Computing Normals
- Lighting Quality
- Light Sources
- Creating Lights
- Ambient Light
- Directional Light
- Omnidirectional Light
- Spot Light
- Materials
- Creating Materials
- Defining Material Properties
- Emulating Light
- Texture Baking
- Vertex Colors
- Light Maps
- Summary
PART III: Advanced Topics
Chapter 9: Scene Graphs
- Retained Mode
- Creating a Scene Graph
- Node Transformations
- Rendering a World
- Retained versus Immediate Mode
- Node Properties
- Selecting Nodes
- Traversing a Scene Graph
- User IDs
- Picking
- Scoping
- Aligning Nodes
- Billboards
- Screen-Aligned Billboards
- Axis-Aligned Billboards
- Summary
Chapter 10: M3G's File Format
- Creating M3G Files with Blender
- Setting Up the Environment
- Getting to Know Blender
- Monkey Business
- Exporting the Scene
- Using M3G Files in Your Application
- Loading and Displaying the Contents
- Finding Nodes
- Coordinate Axes
- Improving the Result
- Export Options
- Adjusting the Render Preview
- Producing the Minimum Number of Vertices
- Reducing the Poly Count
- Analyzing M3G File
- File Structure
- Contents of the Blender Generated File
- Extending the M3G Exporter Script
- Writing Blender Scripts
- Data-Driven Applications
- Playing Memory
- Summary
Chapter 11: Keyframe Animations
- Keyframes
- Creating Keyframe Sequences
- Interpolation Modes
- Animation Targets
- Controlling Animations
- The Animation Loop
- World versus Sequence Time
- Moving Images
- Drawing into Textures
- UV Animations
- UV Animations in Action
- Alternatives
- Summary
Chapter 12: Dynamic Meshes
- Morphing
- Basic Morphing
- Creating a MorphingMesh
- Animating Morph Targets
- Skinned Meshes
- Creating Skin and Skeleton
- Attaching the Skin to the Skeleton
- Rotating Bones with Quaternions
- Animating the Skeleton
- An Articulated Robot
- Rigging the Robot Model
- Skinning the Mesh
- Posing the Walk Animation
- Importing the Robot Model
- Switching Between Animation Sequences
- Summary
