Example usage for javax.media.j3d VirtualUniverse VirtualUniverse

List of usage examples for javax.media.j3d VirtualUniverse VirtualUniverse

Introduction

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

Prototype

public VirtualUniverse() 

Source Link

Document

Constructs a new VirtualUniverse.

Usage

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);//w w  w . 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);
}

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.//from w  w  w  .j a va 2 s .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: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  ww .j ava 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: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  w w w  .ja 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);
}

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  . j av  a2 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: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);//from   ww w .  j ava 2 s .c  o  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);//  ww 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: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);/*w  ww . ja  v a  2s .  c o m*/
    setLayout(new BorderLayout());
    add("Center", myCanvas3D);
    add("South", myButton);
    myButton.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);// w ww  .  ja va  2  s. c o m
    setLayout(new BorderLayout());
    add("Center", myCanvas3D);
    add("South", myButton);
    myButton.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 a v a  2  s.  co  m
    setLayout(new BorderLayout());
    add("Center", myCanvas3D);
    add("South", myButton);
    myButton.addActionListener(this);
    setVisible(true);
}