|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.VirtualUniverse | +--com.sun.j3d.utils.universe.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
Field Summary | |
protected Locale |
locale
Locale reference needed to create the "view" portion of the scene graph. |
protected Viewer |
viewer
Viewer reference needed to create the "view" portion of the scene graph. |
protected ViewingPlatform |
viewingPlatform
ViewingPlatform reference needed to create the "view" portion of the scene graph. |
Constructor Summary | |
SimpleUniverse()
Creates a locale, a single ViewingPlatform, and and a Viewer object (both with their default values). |
|
SimpleUniverse(Canvas3D canvas)
Creates a locale, a single ViewingPlatform (with default values), and and a Viewer object. |
|
SimpleUniverse(HiResCoord origin,
int numTransforms,
Canvas3D canvas,
java.net.URL userConfig)
Creates the "view" side of the scene graph. |
|
SimpleUniverse(ViewingPlatform viewingPlatform,
Viewer viewer)
Creates the "view" side of the scene graph. |
Method Summary | |
void |
addBranchGraph(BranchGroup bg)
Used to add Nodes to the geometry side (as opposed to the view side) of the scene graph. |
Canvas3D |
getCanvas()
Returns the Canvas3D object associated with this Java 3D Universe. |
Canvas3D |
getCanvas(int canvasNum)
Returns the Canvas3D object at the specified index associated with this Java 3D Universe. |
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 |
getAllLocales,
getJ3DThreadPriority,
numLocales,
removeAllLocales,
removeLocale,
setJ3DThreadPriority |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected Locale locale
protected Viewer viewer
protected ViewingPlatform viewingPlatform
Constructor Detail |
public SimpleUniverse()
Locale
,
Viewer
,
ViewingPlatform
public SimpleUniverse(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(HiResCoord origin, int numTransforms, 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. Passing in null causes the default values
to be used.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.Method Detail |
public Locale getLocale()
public Viewer getViewer()
public ViewingPlatform getViewingPlatform()
public Canvas3D getCanvas()
Viewer
public 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(BranchGroup bg)
BranchGroup
- 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |