Java3D Tutorial for version 1.2 is fine for Java3D 1.3 too. The Tutorial just lack some enhanced features from 1.3 version. But the basics are there. The Canvas3D is the component for 3D viewing. You need that.
I guess you may need to install the Java3D SDK. The Java3D SDK enables you to compile and run Java3D applications. And there are some nice demos included. The Java3D JRE is a lighter version, just for running the applications. There is no demos included. Alessandro --- Wileynet <[EMAIL PROTECTED]> escreveu: > I'm going through the Java3D API tutorial chapter 1 > for v1.2. I cannot > find a tutorial that is using v1.3 which I have > installed. I do not seem > to have a class called Canvas3D. I cannot compile > the below code because > the compiler cannot find the class... does anyone > know what I can > substitute Canvas3D with or should I just use v1.2 > until I grow up? > > import java.applet.Applet; > import java.awt.BorderLayout; > import java.awt.Frame; > import java.awt.event.*; > import java.awt.GraphicsConfiguration; > import com.sun.j3d.utils.applet.MainFrame; > import com.sun.j3d.utils.universe.*; > import com.sun.j3d.utils.geometry.ColorCube; > import javax.media.j3d.*; > import javax.vecmath.*; > > > public class HelloJava3Da extends Applet { > public HelloJava3Da() { > setLayout( new BorderLayout()); > GraphicsConfiguration config = > SimpleUniverse.getPreferredConfiguration(); > Canvas3D canvas3D = new Canvas3D(config); > add("Center", canvas3D); > > BranchGroup scene = createSceneGraph(); > scene.compile(); > > //simpleUniverse is a Convenience Utility > class > SimpleUniverse simpleU = > SimpleUniverse(canvas3D); > > //This Moves the ViewPlatform back a bit so > the > //objects in the scene can be viewed. > > simpleU.getViewingPlatform().setNominalViewingTransform(); > > simpleU.addBranchGraph(scene); > }//end of HelloJava3Da (constructor) > > public BranchGroup createSceneGraph() { > //Create the root of the branch graph > BranchGroup objRoot = new BranchGroup(); > > //Create a simple shape leaf node, add it to > the scene graph. > //ColorCube is a Convenience Utility class > objRoot.addChild(new ColorCube(0.4)); > > return objRoot; > }// end of createSceneGraph method of > HelloJava3Da > > // The following lines allow this to > be run as an > application > // as well as an applet. > > public static void main(String[] args){ > Frame frame = new MainFrame(new > HelloJava3Da(), 256, 256 ); > } // end of main (method of HelloJava3Da) > }// end of class HelloJava3Da > > Thanks for anything... > -Wiley > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] > and include in the body > of the message "signoff JAVA3D-INTEREST". For > general help, send email to > [EMAIL PROTECTED] and include in the body of the > message "help". _______________________________________________________________________ Yahoo! Mail Mais espaço, mais segurança e gratuito: caixa postal de 6MB, antivírus, proteção contra spam. http://br.mail.yahoo.com/ =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".