
M3G Chapter 4.5. Using M3G File Models

From:
  Java Programming Techniques for 2D, 2.5D, 3D, and Network Games

  Dr. Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat yai, Songkhla 90112, Thailand
  E-mail: dandrew@ratree.psu.ac.th

  Web Site for the book: http://fivedots.coe.psu.ac.th/~ad/jg


If you use this code, please mention my name, and include a link
to the book's Web site.

Thanks,
  Andrew


This chapter contains two examples: ViewM3G and LoaderM3G.

============================
ViewM3G

ViewM3G requires the Mobile 3D Graphics API which
is available in version 2.2. of the J2ME Wirelss Toolkit (WTK22).
It can be downloaded from 
http://java.sun.com/products/j2mewtoolkit/

ViewM3G consists of 5 Java files in the ViewM3G\src\ subdirectory:

   ViewM3G.java, ViewCanvas.java, ViewModel.java, Floor.java, 
   MobileModelCamera.java

and image files in the ViewM3G\res\ directory:

   bigGrid.gif, and several M3G files from Leon HongKong, from
   the WTK22 3D examples, and from Nokia's "3-D Game Development 
   on JSR-184" article

------
Compilation and Execution (using WTK22's KToolbar)

Create a new project called ViewM3G, with the MIDlet
class name ViewM3G.

Make sure to use the CLDC 1.1 configuration (so floats can be 
manipulated) and the Mobile 3D Graphics for J2ME (JSR 184) API.

Copy the Java files in src\ to WTK22\apps\ViewM3G\src\ 

Copy the image files in res\ to WTK22\apps\ViewM3G\res\

Build and run.

---------
============================
LoaderM3G

LoaderM3G requires the Mobile 3D Graphics API which
is available in version 2.2. of the J2ME Wirelss Toolkit (WTK22).
It can be downloaded from 
http://java.sun.com/products/j2mewtoolkit/

LoaderM3G consists of 4 Java files in the LoaderM3G\src\ subdirectory:

   LoaderM3G.java, LoaderCanvas.java, Floor.java, MobileCamera.java

and image files in the LoaderM3G\res\ directory:

   bigGrid.gif, and several M3G files from Leon HongKong, from
   the WTK22 3D examples, and from Nokia's "3-D Game Development 
   on JSR-184" article

------
Compilation and Execution (using WTK22's KToolbar)

Create a new project called LoaderM3G, with the MIDlet
class name LoaderM3G.

Make sure to use the CLDC 1.1 configuration (so floats can be 
manipulated) and the Mobile 3D Graphics for J2ME (JSR 184) API.

Copy the Java files in src\ to WTK22\apps\LoaderM3G\src\ 

Copy the image files in res\ to WTK22\apps\LoaderM3G\res\

Build and run.

---------
Last updated: 24th November 2004
