|
I read a turotial and i am trying to figure out the
Java3d
Here is my attempt to create a simple
Sphere
-----------------
import com.sun.j3d.utils.universe.*;
import com.sun.j3d.utils.geometry.Sphere; import javax.media.j3d.BranchGroup; import com.sun.j3d.utils.applet.MainFrame; import javax.media.j3d.*; import java.awt.*; public class MyFirstSphere extends java.applet.Applet { public MyFirstSphere()
{
SimpleUniverse universe = new
SimpleUniverse();
GraphicsConfiguration config = universe.getPreferredConfiguration(); Canvas3D c = new Canvas3D(config); add("Center", c); BranchGroup group = new
BranchGroup();
group.addChild(new
Sphere(4));
universe.getViewingPlatform().setNominalViewingTransform(); universe.addBranchGraph(group);
}
public static void main( String[] args ) {
new MyFirstSphere();
}
---------------------------- The problem is that everything is being compiled
coorectly but nothing is being displayed when i run it
|
- Re: [JAVA3D] My first Sp... Γιάννης
- Re: [JAVA3D] My fir... Ricardo Nakamura
- Re: [JAVA3D] My... �������
