List of usage examples for javax.media.j3d Locale addBranchGraph
public void addBranchGraph(BranchGroup branchGroup)
From source file:SimpleCombine.java
public SimpleCombine() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch(buildShape())); setTitle("SimpleWorld"); setSize(400, 400);//from ww w.j a va 2 s . c o m setLayout(new BorderLayout()); add("Center", myCanvas3D); add("South", myButton); myButton.addActionListener(this); setVisible(true); }
From source file:SimpleMorph2.java
public SimpleMorph2() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch()); setTitle("SimpleMorph"); setSize(400, 400);//from w w w. j av a 2 s.c o 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:SimpleCollision.java
public SimpleCollision() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch()); setTitle("SimpleWorld"); setSize(400, 400);/*from ww w . j a v a 2 s . c o 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:SimpleCollision2.java
public SimpleCollision2() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch()); setTitle("SimpleWorld"); setSize(400, 400);//from w w w . ja va 2s .c om 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:SimpleSounds.java
public SimpleSounds() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); // buildUniverse(myCanvas3D); myLocale.addBranchGraph(buildContentBranch()); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); setTitle("SimpleSounds"); setSize(400, 400);// w w w .j av a2s.c o m setLayout(new BorderLayout()); Panel bottom = new Panel(); bottom.add(sound1Button); bottom.add(sound2Button); bottom.add(exitButton); add(BorderLayout.CENTER, myCanvas3D); add(BorderLayout.SOUTH, bottom); exitButton.addActionListener(this); sound1Button.addActionListener(this); sound2Button.addActionListener(this); setVisible(true); }
From source file:SimpleGame.java
public SimpleGame() { VirtualUniverse myUniverse = new VirtualUniverse(); Locale myLocale = new Locale(myUniverse); myLocale.addBranchGraph(buildViewBranch(myCanvas3D)); myLocale.addBranchGraph(buildContentBranch()); setTitle("Duck Shoot!"); setSize(400, 400);/* w ww . j a v a2 s . c o m*/ setLayout(new BorderLayout()); add("Center", myCanvas3D); exitButton.addActionListener(this); add("South", exitButton); setVisible(true); }
From source file:MixedTest.java
protected void addViewBranchGroup(Locale locale, BranchGroup bg) { locale.addBranchGraph(bg); }
From source file:SwingTest.java
/** * Adds the View side of the scenegraph to the Locale *///from w w w .jav a2 s . co m protected void addViewBranchGroup(Locale locale, BranchGroup bg) { locale.addBranchGraph(bg); }
From source file:SwingTest.java
/** * Initialize the Java 3D rendering system and view side scenegraph. *///from w w w. ja v a 2 s. c o m protected void init() { VirtualUniverse universe = createVirtualUniverse(); Locale locale = createLocale(universe); BranchGroup sceneBranchGroup = createSceneBranchGroup(); Background background = createBackground(); if (background != null) sceneBranchGroup.addChild(background); ViewPlatform vp = createViewPlatform(); BranchGroup viewBranchGroup = createViewBranchGroup(getViewTransformGroupArray(), vp); locale.addBranchGraph(sceneBranchGroup); addViewBranchGroup(locale, viewBranchGroup); createView(vp); }
From source file:MixedTest.java
public void initJava3d() { // m_Java3dTree = new com.tornadolabs.j3dtree.Java3dTree(); m_Universe = createVirtualUniverse(); Locale locale = createLocale(m_Universe); BranchGroup sceneBranchGroup = createSceneBranchGroup(); ViewPlatform vp = createViewPlatform(); BranchGroup viewBranchGroup = createViewBranchGroup(getViewTransformGroupArray(), vp); createView(vp);//from ww w .ja v a 2 s . co m Background background = createBackground(); if (background != null) sceneBranchGroup.addChild(background); // m_Java3dTree.recursiveApplyCapability(sceneBranchGroup); // m_Java3dTree.recursiveApplyCapability(viewBranchGroup); locale.addBranchGraph(sceneBranchGroup); addViewBranchGroup(locale, viewBranchGroup); onDoneInit(); }