|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.VirtualUniverse
com.sun.j3d.utils.universe.SimpleUniverse
public class SimpleUniverse
This class sets up a minimal user environment to quickly and easily get a Java 3D program up and running. This utility class creates all the necessary objects on the "view" side of the scene graph. Specifically, this class creates a locale, a single ViewingPlatform, and a Viewer object (both with their default values). Many basic Java 3D applications will find that SimpleUniverse provides all necessary functionality needed by their applications. More sophisticated applications may find that they need more control in order to get extra functionality and will not be able to use this class.
Viewer
,
ViewingPlatform
Constructor Summary | |
---|---|
SimpleUniverse()
Creates a locale, a single ViewingPlatform, and and a Viewer object (both with their default values). |
|
SimpleUniverse(javax.media.j3d.Canvas3D canvas)
Creates a locale, a single ViewingPlatform (with default values), and and a Viewer object. |
|
SimpleUniverse(javax.media.j3d.Canvas3D canvas,
int numTransforms)
Creates a locale, a single ViewingPlatform, and a Viewer object The Viewer object uses default values for everything but the canvas. |
|
SimpleUniverse(javax.media.j3d.Canvas3D canvas,
int numTransforms,
LocaleFactory localeFactory)
Creates a locale, a single ViewingPlatform, and a Viewer object The Viewer object uses default values for everything but the canvas. |
|
SimpleUniverse(javax.media.j3d.HiResCoord origin,
int numTransforms,
javax.media.j3d.Canvas3D canvas,
java.net.URL userConfig)
Deprecated. use ConfiguredUniverse constructors to read a configuration file |
|
SimpleUniverse(javax.media.j3d.HiResCoord origin,
int numTransforms,
javax.media.j3d.Canvas3D canvas,
java.net.URL userConfig,
LocaleFactory localeFactory)
Deprecated. use ConfiguredUniverse constructors to read a configuration file |
|
SimpleUniverse(int numTransforms)
Creates a locale, a single ViewingPlatform, and a Viewer object (with default values). |
|
SimpleUniverse(ViewingPlatform viewingPlatform,
Viewer viewer)
Creates the "view" side of the scene graph. |
|
SimpleUniverse(ViewingPlatform viewingPlatform,
Viewer viewer,
LocaleFactory localeFactory)
Creates the "view" side of the scene graph. |
Method Summary | |
---|---|
void |
addBranchGraph(javax.media.j3d.BranchGroup bg)
Used to add Nodes to the geometry side (as opposed to the view side) of the scene graph. |
void |
cleanup()
Cleanup memory use and reference by SimpleUniverse. |
javax.media.j3d.Canvas3D |
getCanvas()
Returns the Canvas3D object associated with this Java 3D Universe. |
javax.media.j3d.Canvas3D |
getCanvas(int canvasNum)
Returns the Canvas3D object at the specified index associated with this Java 3D Universe. |
javax.media.j3d.Locale |
getLocale()
Returns the Locale object associated with this scene graph. |
static java.awt.GraphicsConfiguration |
getPreferredConfiguration()
Finds the preferred GraphicsConfiguration object
for the system. |
Viewer |
getViewer()
Returns the Viewer object associated with this scene graph. |
ViewingPlatform |
getViewingPlatform()
Returns the ViewingPlatform object associated with this scene graph. |
Methods inherited from class javax.media.j3d.VirtualUniverse |
---|
addGraphStructureChangeListener, addRenderingErrorListener, addShaderErrorListener, getAllLocales, getJ3DThreadPriority, getProperties, numLocales, removeAllLocales, removeGraphStructureChangeListener, removeLocale, removeRenderingErrorListener, removeShaderErrorListener, setJ3DThreadPriority |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleUniverse()
Locale
,
Viewer
,
ViewingPlatform
public SimpleUniverse(int numTransforms)
numTransforms
- The number of transforms to be in the
MultiTransformGroup object.Locale
,
Viewer
,
ViewingPlatform
public SimpleUniverse(javax.media.j3d.Canvas3D canvas)
canvas
- The canvas to associate with the Viewer object. Passing
in null will cause this parameter to be ignored and a canvas to be
created by the utility.Locale
,
Viewer
,
ViewingPlatform
public SimpleUniverse(javax.media.j3d.Canvas3D canvas, int numTransforms)
canvas
- The canvas to associate with the Viewer object. Passing
in null will cause this parameter to be ignored and a canvas to be
created by the utility.numTransforms
- The number of transforms to be in the
MultiTransformGroup object.Locale
,
Viewer
,
ViewingPlatform
,
MultiTransformGroup
public SimpleUniverse(javax.media.j3d.Canvas3D canvas, int numTransforms, LocaleFactory localeFactory)
canvas
- The canvas to associate with the Viewer object. Passing
in null will cause this parameter to be ignored and a canvas to be
created by the utility.numTransforms
- The number of transforms to be in the
MultiTransformGroup object.localeFactory
- Factory for creating the localeLocale
,
Viewer
,
ViewingPlatform
,
MultiTransformGroup
public SimpleUniverse(javax.media.j3d.HiResCoord origin, int numTransforms, javax.media.j3d.Canvas3D canvas, java.net.URL userConfig)
origin
- The origin used to set the origin of the Locale object.
If this object is null, then 0.0 is used.numTransforms
- The number of transforms to be in the
MultiTransformGroup object.canvas
- The canvas to draw into. If this is null, it is
ignored and a canvas will be created by the utility.userConfig
- The URL to the user's configuration file, used
by the Viewer object. This is never examined and default values are
always taken.Locale
,
Viewer
,
ViewingPlatform
,
MultiTransformGroup
public SimpleUniverse(javax.media.j3d.HiResCoord origin, int numTransforms, javax.media.j3d.Canvas3D canvas, java.net.URL userConfig, LocaleFactory localeFactory)
origin
- The origin used to set the origin of the Locale object.
If this object is null, then 0.0 is used.numTransforms
- The number of transforms to be in the
MultiTransformGroup object.canvas
- The canvas to draw into. If this is null, it is
ignored and a canvas will be created by the utility.userConfig
- The URL to the user's configuration file, used
by the Viewer object. This is never examined and default values are
always taken.localeFactory
- The Locale Factory which will instantiate the
locale(s) for this universe.Locale
,
Viewer
,
ViewingPlatform
,
MultiTransformGroup
public SimpleUniverse(ViewingPlatform viewingPlatform, Viewer viewer)
viewingPlatform
- The viewingPlatform to use to create
the "view" side of the scene graph.viewer
- The viewer object to use to create
the "view" side of the scene graph.public SimpleUniverse(ViewingPlatform viewingPlatform, Viewer viewer, LocaleFactory localeFactory)
viewingPlatform
- The viewingPlatform to use to create
the "view" side of the scene graph.viewer
- The viewer object to use to create
the "view" side of the scene graph.localeFactory
- The factory used to create the Locale ObjectMethod Detail |
---|
public javax.media.j3d.Locale getLocale()
public Viewer getViewer()
public ViewingPlatform getViewingPlatform()
public javax.media.j3d.Canvas3D getCanvas()
Viewer
public javax.media.j3d.Canvas3D getCanvas(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 void addBranchGraph(javax.media.j3d.BranchGroup bg)
bg
- The BranchGroup to attach to this Universe's Locale.public static java.awt.GraphicsConfiguration getPreferredConfiguration()
GraphicsConfiguration
object
for the system. This object can then be used to create the
Canvas3D objet for this system.
GraphicsConfiguration
object for
the system.public void cleanup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |