FileDocCategorySizeDatePackage
HelloJava3Da.javaAPI DocExample3298Fri Sep 22 14:47:38 BST 2000None

HelloJava3Da

public class HelloJava3Da extends Applet

Fields Summary
Constructors Summary
public HelloJava3Da()

        setLayout(new BorderLayout());
        GraphicsConfiguration config =
           SimpleUniverse.getPreferredConfiguration();

        Canvas3D canvas3D = new Canvas3D(config);
        add("Center", canvas3D);

        BranchGroup scene = createSceneGraph();

        // SimpleUniverse is a Convenience Utility class
        SimpleUniverse simpleU = new SimpleUniverse(canvas3D);

	// This will move the ViewPlatform back a bit so the
	// objects in the scene can be viewed.
        simpleU.getViewingPlatform().setNominalViewingTransform();

        simpleU.addBranchGraph(scene);
    
Methods Summary
public BranchGroupcreateSceneGraph()

	// Create the root of the branch graph
	BranchGroup objRoot = new BranchGroup();

	objRoot.addChild(new ColorCube(0.4));

	return objRoot;
    
public static voidmain(java.lang.String[] args)

	Frame frame = new MainFrame(new HelloJava3Da(), 256, 256);