Code Sample 3 Initializing The World - Motorola V3x Technical Manual

2 cameras; 320x240 display
Hide thumbs Also See for V3x:
Table of Contents

Advertisement

Objects3D[] roots = Loader.load(getAppProperty("Content-
1"));
// Assume the world is the first root node loaded.
myWorld = (World) roots[0];
}
catch(Exception e)
{
e.printStackTrace();
}
// Force a repaint so the update loop is started.
myCanvas.repaint();
}
Using the Graphics3D object
Using the Graphics3D is very straightforward. Get the Graphics3D instance, bind a target
to it, render everything, and release the target.
public class myCanvas extends Canvas
{
Graphics3D
public void paint(Graphics g)
{
myG3D.bindTarget(g);
try
{
}
finally
{
}
66

Code Sample 3 Initializing the world

myG3D = Graphics3D.getInstance();
myG3D.render(myWorld);
myG3D.releaseTarget();

Advertisement

Table of Contents
loading

Table of Contents