public class SimpleUniverse extends VirtualUniverse
Viewer
,
ViewingPlatform
Modifier and Type | Field and Description |
---|---|
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.
|
Constructor and Description |
---|
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(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(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(HiResCoord origin,
int numTransforms,
Canvas3D canvas,
URL userConfig)
Deprecated.
use ConfiguredUniverse constructors to read a
configuration file
|
SimpleUniverse(HiResCoord origin,
int numTransforms,
Canvas3D canvas,
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.
|
Modifier and Type | Method and Description |
---|---|
void |
addBranchGraph(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.
|
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 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.
|
addGraphStructureChangeListener, addRenderingErrorListener, addShaderErrorListener, getAllLocales, getJ3DThreadPriority, getProperties, numLocales, removeAllLocales, removeGraphStructureChangeListener, removeLocale, removeRenderingErrorListener, removeShaderErrorListener, setJ3DThreadPriority
protected Locale locale
protected Viewer[] viewer
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(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(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(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(HiResCoord origin, int numTransforms, Canvas3D canvas, 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(HiResCoord origin, int numTransforms, Canvas3D canvas, 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 Objectpublic 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)
bg
- The BranchGroup to attach to this Universe's Locale.public static 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()
Copyright © 2016–2022 SciJava. All rights reserved.