List of usage examples for javax.media.j3d Locale addBranchGraph
public void addBranchGraph(BranchGroup branchGroup)
From source file:SimpleBillboard.java
public SimpleBillboard() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch()); setTitle("SimpleBillboard"); setSize(400, 400);//from www . j a va2 s . co m setLayout(new BorderLayout()); Panel bottom = new Panel(); bottom.add(exitButton); add(BorderLayout.CENTER, myCanvas3D); add(BorderLayout.SOUTH, bottom); exitButton.addActionListener(this); setVisible(true); }
From source file:SimpleIndexedQuad.java
public SimpleIndexedQuad() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch(buildShape())); setTitle("SimpleIndexedQuad"); setSize(400, 400);// w w w . j a v a2 s. co m setLayout(new BorderLayout()); add("Center", myCanvas3D); add("South", myButton); myButton.addActionListener(this); setVisible(true); }
From source file:SimpleIndexedQuadNormals.java
public SimpleIndexedQuadNormals() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch(buildShape())); setTitle("SimpleIndexedQuadNormals"); setSize(400, 400);//from w w w . j a v a 2 s . com setLayout(new BorderLayout()); add("Center", myCanvas3D); add("South", myButton); myButton.addActionListener(this); setVisible(true); }
From source file:SimpleIndexedQuadSmooth.java
public SimpleIndexedQuadSmooth() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch(buildShape())); setTitle("SimpleIndexedQuadSmooth"); setSize(400, 400);/*from w ww . java 2 s. c o m*/ setLayout(new BorderLayout()); add("Center", myCanvas3D); add("South", myButton); myButton.addActionListener(this); setVisible(true); }
From source file:SimpleSwitch.java
public SimpleSwitch() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch(buildShape())); setTitle("SimpleWorld"); setSize(400, 400);//from w w w.ja v a 2 s. c om setLayout(new BorderLayout()); Panel bottom = new Panel(); bottom.add(boxButton); bottom.add(coneButton); bottom.add(exitButton); add(BorderLayout.CENTER, myCanvas3D); add(BorderLayout.SOUTH, bottom); exitButton.addActionListener(this); boxButton.addActionListener(this); coneButton.addActionListener(this); setVisible(true); }
From source file:SimpleTextureGen.java
public SimpleTextureGen() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch(buildShape())); setTitle("SimpleWorld"); setSize(400, 400);//from w ww. ja v a 2 s .c o m setLayout(new BorderLayout()); add("Center", myCanvas3D); add("South", myButton); myButton.addActionListener(this); setVisible(true); }
From source file:SimpleTransform.java
public SimpleTransform() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch(buildShape())); setTitle("SimpleWorld"); setSize(400, 400);//from w w w . ja v a 2 s. c o m setLayout(new BorderLayout()); Panel bottom = new Panel(); bottom.add(leftButton); bottom.add(rightButton); bottom.add(exitButton); add(BorderLayout.CENTER, myCanvas3D); add(BorderLayout.SOUTH, bottom); exitButton.addActionListener(this); leftButton.addActionListener(this); rightButton.addActionListener(this); setVisible(true); }
From source file:SimpleTexture.java
public SimpleTexture() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch(buildShape())); setTitle("SimpleTexture"); setSize(400, 400);//from w w w. j av a 2 s . c o m setLayout(new BorderLayout()); add("Center", myCanvas3D); add("South", myButton); myButton.addActionListener(this); setVisible(true); }
From source file:SimpleWorld.java
/** * This creates a default universe and locale, creates a window and uses the * functions defined in this class to build the view and content branches of * the scene graph.//from w w w .j a va 2 s. c o m */ public SimpleWorld() { //Create a default universe and locale VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); //Use the functions to build the scene graph myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch(buildCube())); //Do some AWT stuff to set up the window setTitle("SimpleWorld"); setSize(400, 400); setLayout(new BorderLayout()); add("Center", myCanvas3D); myButton.addActionListener(this); add("South", myButton); setVisible(true); }
From source file:SimpleMorph.java
/** * Constructor that generates the content using the class methods *///w w w .jav a 2 s. c o m public SimpleMorph() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch()); setTitle("SimpleMorph"); setSize(400, 400); setLayout(new BorderLayout()); Panel bottom = new Panel(); bottom.add(pyraButton); bottom.add(cubeButton); bottom.add(exitButton); add(BorderLayout.CENTER, myCanvas3D); add(BorderLayout.SOUTH, bottom); pyraButton.addActionListener(this); cubeButton.addActionListener(this); exitButton.addActionListener(this); setVisible(true); }