List of usage examples for javax.media.j3d Locale Locale
public Locale(VirtualUniverse universe)
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. ja v a 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:J3dSwingFrame.java
/** * Create the basic universe and all of the supporting infrastructure that * is needed by a J3D application. The default setup just uses a single * local located at the origin./*w w w . ja v a 2 s . co m*/ */ public UniverseManager() { locale = new Locale(this); view_group = new BranchGroup(); view_group.setCapability(Group.ALLOW_CHILDREN_EXTEND); world_object_group = new BranchGroup(); world_object_group.setCapability(Group.ALLOW_CHILDREN_EXTEND); }
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);// w ww . j a va2 s. c o m 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);/* w w w . jav a2s. 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);// ww 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: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. ja va2 s . c om 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 ww.j ava2 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);//from ww 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: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 ww w. ja va 2s . 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);/* w ww. j a v a 2s. c o m*/ setLayout(new BorderLayout()); add("Center", myCanvas3D); add("South", myButton); myButton.addActionListener(this); setVisible(true); }