Example usage for javax.media.j3d Locale addBranchGraph

List of usage examples for javax.media.j3d Locale addBranchGraph

Introduction

In this page you can find the example usage for javax.media.j3d Locale addBranchGraph.

Prototype

public void addBranchGraph(BranchGroup branchGroup) 

Source Link

Document

Add a new branch graph rooted at BranchGroup to the list of branch graphs.

Usage

From source file:SimpleCylinder.java

public SimpleCylinder() {
    VirtualUniverse myUniverse = new VirtualUniverse();
    Locale myLocale = new Locale(myUniverse);
    myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
    myLocale.addBranchGraph(buildContentBranch());
    setTitle("SimpleCylinder");
    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:SimpleCone.java

public SimpleCone() {
    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  .  j a v  a 2  s.c  o  m
    setLayout(new BorderLayout());
    add("Center", myCanvas3D);
    add("South", myButton);
    myButton.addActionListener(this);
    setVisible(true);
}

From source file:SimpleWire.java

public SimpleWire() {
    VirtualUniverse myUniverse = new VirtualUniverse();
    Locale myLocale = new Locale(myUniverse);
    myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
    myLocale.addBranchGraph(buildContentBranch(buildShape()));
    setTitle("SimpleWire");
    setSize(400, 400);//from   ww w. ja v  a2s. c  om
    setLayout(new BorderLayout());
    add("Center", myCanvas3D);
    add("South", myButton);
    myButton.addActionListener(this);
    setVisible(true);
}

From source file:SimpleSphere.java

public SimpleSphere() {
    VirtualUniverse myUniverse = new VirtualUniverse();
    Locale myLocale = new Locale(myUniverse);
    myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
    myLocale.addBranchGraph(buildContentBranch());
    setTitle("SimpleWorld");
    setSize(400, 400);/*from w  ww .  ja  va2s  .  co m*/
    setLayout(new BorderLayout());
    add("Center", myCanvas3D);
    add("South", myButton);
    myButton.addActionListener(this);
    setVisible(true);
}

From source file:SimpleRotator.java

public SimpleRotator() {
    VirtualUniverse myUniverse = new VirtualUniverse();
    Locale myLocale = new Locale(myUniverse);
    myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
    //   myLocale.addBranchGraph(buildContentBranch(buildShape()));
    setTitle("SimpleRotator");
    setSize(400, 400);//from  w w w.  j  a v  a 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:SimpleDirLight.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.//  w  w  w. jav a 2 s.c  om
 */
public SimpleDirLight() {
    VirtualUniverse myUniverse = new VirtualUniverse();
    Locale myLocale = new Locale(myUniverse);
    myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
    myLocale.addBranchGraph(buildContentBranch());
    setTitle("SimpleDirLight");
    setSize(400, 400);
    setLayout(new BorderLayout());
    add("Center", myCanvas3D);
    add("South", myButton);
    myButton.addActionListener(this);
    setVisible(true);
}

From source file:SimpleSpotLights.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./* w  w  w  .ja  v  a2s  .c o  m*/
 */
public SimpleSpotLights() {
    VirtualUniverse myUniverse = new VirtualUniverse();
    Locale myLocale = new Locale(myUniverse);
    myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
    myLocale.addBranchGraph(buildContentBranch());
    setTitle("SimpleDirLight");
    setSize(400, 400);
    setLayout(new BorderLayout());
    add("Center", myCanvas3D);
    add("South", myButton);
    myButton.addActionListener(this);
    setVisible(true);
}

From source file:SimpleLOD.java

public SimpleLOD() {
    VirtualUniverse myUniverse = new VirtualUniverse();
    Locale myLocale = new Locale(myUniverse);
    myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
    myLocale.addBranchGraph(buildContentBranch());
    setTitle("SimpleLOD");
    setSize(400, 400);/*from  www .j a  v a  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:SimpleKeyNav.java

public SimpleKeyNav() {
    VirtualUniverse myUniverse = new VirtualUniverse();
    Locale myLocale = new Locale(myUniverse);
    myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
    myLocale.addBranchGraph(buildContentBranch());
    setTitle("SimpleKeyNav");
    setSize(400, 400);/*from   ww  w . j  a  va2s.com*/
    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:SimpleMouse.java

public SimpleMouse() {
    VirtualUniverse myUniverse = new VirtualUniverse();
    Locale myLocale = new Locale(myUniverse);
    myLocale.addBranchGraph(buildViewBranch(myCanvas3D));
    myLocale.addBranchGraph(buildContentBranch());
    setTitle("SimpleMouse");
    setSize(400, 400);//from w ww . j a  v  a  2  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);
}