|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.universe.Viewer
public class Viewer
The Viewer class holds all the information that describes the physical and virtual "presence" in the Java 3D universe. The Viewer object consists of:
Canvas3D
,
PhysicalEnvironment
,
PhysicalBody
,
View
,
ViewerAvatar
Constructor Summary | |
---|---|
Viewer()
Creates a default viewer object. |
|
Viewer(javax.media.j3d.Canvas3D userCanvas)
Creates a default viewer object. |
|
Viewer(javax.media.j3d.Canvas3D[] userCanvases)
Creates a default viewer object. |
|
Viewer(javax.media.j3d.Canvas3D[] userCanvases,
javax.media.j3d.PhysicalBody userBody,
javax.media.j3d.PhysicalEnvironment userEnvironment,
boolean setVisible)
Creates a viewer object. |
|
Viewer(javax.media.j3d.Canvas3D userCanvas,
java.net.URL userConfig)
Deprecated. create a ConfiguredUniverse to use a configuration file |
|
Viewer(java.net.URL userConfig)
Deprecated. create a ConfiguredUniverse to use a configuration file |
Method Summary | |
---|---|
javax.media.j3d.AudioDevice |
createAudioDevice()
Used to create and initialize a default AudioDevice3D used for sound rendering. |
ViewerAvatar |
getAvatar()
Gets the geometry associated with the viewer's avatar. |
javax.media.j3d.Canvas3D |
getCanvas3D()
Returns the 0th Canvas3D object associated with this Viewer object |
javax.media.j3d.Canvas3D |
getCanvas3D(int canvasNum)
Returns the Canvas3D object at the specified index associated with this Viewer object. |
javax.media.j3d.Canvas3D[] |
getCanvas3Ds()
Returns all the Canvas3D objects associated with this Viewer object. |
javax.media.j3d.Canvas3D |
getCanvases()
Deprecated. superceded by getCanvas3D() |
java.awt.Frame |
getFrame()
Deprecated. AWT Frame components are no longer created by the Viewer class. |
javax.swing.JFrame |
getJFrame(int frameNum)
Returns the JFrame object created by this Viewer object at the specified index. |
javax.swing.JFrame[] |
getJFrames()
Returns all the JFrames created by this Viewer object. |
javax.swing.JPanel |
getJPanel(int panelNum)
Returns the JPanel object created by this Viewer object at the specified index. |
javax.swing.JPanel[] |
getJPanels()
Returns all the JPanel objects created by this Viewer object. |
java.awt.Panel |
getPanel()
Deprecated. AWT Panel components are no longer created by the Viewer class. |
javax.media.j3d.PhysicalBody |
getPhysicalBody()
Returns the PhysicalBody object associated with the Viewer object. |
javax.media.j3d.PhysicalEnvironment |
getPhysicalEnvironment()
Returns the PhysicalEnvironment object associated with the Viewer object. |
SimpleUniverse |
getUniverse()
Returns the Universe to which this Viewer is attached |
javax.media.j3d.View |
getView()
Returns the View object associated with the Viewer object. |
ViewingPlatform |
getViewingPlatform()
Get the ViewingPlatform object used by this Viewer. |
void |
setAvatar(ViewerAvatar avatar)
Sets the geometry to be associated with the viewer's avatar. |
void |
setViewingPlatform(ViewingPlatform platform)
Set the ViewingPlatform object used by this Viewer. |
void |
setVisible(boolean visible)
Call setVisible() on all Window components created by this Viewer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Viewer()
public Viewer(javax.media.j3d.Canvas3D userCanvas)
userCanvas
- the Canvas3D object to be used for rendering;
if this is null then a single RGB, double buffered and depth buffered
Canvas3D object is createdpublic Viewer(javax.media.j3d.Canvas3D[] userCanvases)
userCanvases
- the Canvas3D objects to be used for rendering;
if this is null then a single RGB, double buffered and depth buffered
Canvas3D object is createdpublic Viewer(javax.media.j3d.Canvas3D[] userCanvases, javax.media.j3d.PhysicalBody userBody, javax.media.j3d.PhysicalEnvironment userEnvironment, boolean setVisible)
userCanvases
- the Canvas3D objects to be used for rendering;
if this is null then a single RGB, double buffered and depth buffered
Canvas3D object is createduserBody
- the PhysicalBody to use for this Viewer; if it is
null, a default PhysicalBody object is createduserEnvironment
- the PhysicalEnvironment to use for this Viewer;
if it is null, a default PhysicalEnvironment object is createdsetVisible
- determines if the Frames should be set to visible once createdpublic Viewer(java.net.URL userConfig)
userConfig
- the URL of the user configuration file used to
initialize the PhysicalBody object; this is always ignoredpublic Viewer(javax.media.j3d.Canvas3D userCanvas, java.net.URL userConfig)
userCanvas
- the Canvas3D object to be used for rendering;
if this is null then a single RGB, double buffered and depth buffered
Canvas3D object is createduserConfig
- the URL of the user configuration file used to
initialize the PhysicalBody object; this is always ignoredMethod Detail |
---|
public void setVisible(boolean visible)
visible
- boolean to be passed to the setVisible() calls on the
Window components created by this Viewerpublic javax.media.j3d.View getView()
public void setViewingPlatform(ViewingPlatform platform)
platform
- The ViewingPlatform object to set for this
Viewer object. Use null to unset the current value and
not assign assign a new ViewingPlatform object.public ViewingPlatform getViewingPlatform()
public void setAvatar(ViewerAvatar avatar)
avatar
- The geometry to associate with this Viewer object.
Passing in null will cause any geometry associated with the Viewer
to be removed from the scen graph.public ViewerAvatar getAvatar()
public javax.media.j3d.PhysicalBody getPhysicalBody()
public javax.media.j3d.PhysicalEnvironment getPhysicalEnvironment()
public javax.media.j3d.Canvas3D getCanvas3D()
public javax.media.j3d.Canvas3D getCanvas3D(int canvasNum)
canvasNum
- the index of the Canvas3D object to retrieve;
if there is no Canvas3D object for the given index, null is returned
public javax.media.j3d.Canvas3D[] getCanvas3Ds()
public javax.media.j3d.Canvas3D getCanvases()
public java.awt.Frame getFrame()
java.lang.UnsupportedOperationException
- if called.public javax.swing.JFrame getJFrame(int frameNum)
NOTE: When running under JDK 1.4 or newer, the JFrame always directly contains the JPanel which contains the Canvas3D. When running under JDK 1.3.1 and creating a borderless full screen through a configuration file, the JFrame will instead contain a JWindow which will contain the JPanel and Canvas3D.
frameNum
- the index of the JFrame object to retrieve;
if there is no JFrame object for the given index, null is returned
public javax.swing.JFrame[] getJFrames()
NOTE: When running under JDK 1.4 or newer, the JFrame always directly contains the JPanel which contains the Canvas3D. When running under JDK 1.3.1 and creating a borderless full screen through a configuration file, the JFrame will instead contain a JWindow which will contain the JPanel and Canvas3D.
public java.awt.Panel getPanel()
java.lang.UnsupportedOperationException
- if called.public javax.swing.JPanel getJPanel(int panelNum)
panelNum
- the index of the JPanel object to retrieve;
if there is no JPanel object for the given index, null is returned
public javax.swing.JPanel[] getJPanels()
public javax.media.j3d.AudioDevice createAudioDevice()
public SimpleUniverse getUniverse()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |