| |
|
| java.lang.Object com.sun.j3d.utils.universe.Viewer
Viewer | public class Viewer (Code) | | The Viewer class holds all the information that describes the physical
and virtual "presence" in the Java 3D universe. The Viewer object
consists of:
- Physical Objects
- Canvas3D's - used to render with.
- PhysicalEnvironment - holds characteristics of the hardware platform
being used to render on.
- PhysicalBody - holds the physical characteristics and personal
preferences of the person who will be viewing the Java 3D universe.
- Virtual Objects
- View - the Java 3D View object.
- ViewerAvatar - the geometry that is used by Java 3D to represent the
person viewing the Java 3D universe.
If the Viewer object is created without any Canvas3D's, or indirectly
through a configuration file, it will create the Canvas3D's as needed.
The default Viewer creates one Canvas3D. If the Viewer object creates
the Canvas3D's, it will also create a JPanel and JFrame for each Canvas3D.
Dynamic video resize is a new feature in Java 3D 1.3.1.
This feature provides a means for doing swap synchronous resizing
of the area that is to be magnified (or passed through) to the
output video resolution. This functionality allows an application
to draw into a smaller viewport in the framebuffer in order to reduce
the time spent doing pixel fill. The reduced size viewport is then
magnified up to the video output resolution using the SUN_video_resize
extension. This extension is only implemented in XVR-4000 and later
hardware with back end video out resizing capability.
If video size compensation is enable, the line widths, point sizes and pixel
operations will be scaled internally with the resize factor to approximately
compensate for video resizing. The location of the pixel ( x, y ) in the
resized framebuffer = ( floor( x * factor + 0.5 ), floor( y * factor + 0.5 ) )
See Also: Canvas3D See Also: PhysicalEnvironment See Also: PhysicalBody See Also: View See Also: ViewerAvatar |
Viewer | public Viewer()(Code) | | Creates a default viewer object. The default values are used to create
the PhysicalBody and PhysicalEnvironment. A single RGB, double buffered
and depth buffered Canvas3D object is created. The View is created
with a front clip distance of 0.1f and a back clip distance of 10.0f.
|
Viewer | public Viewer(Canvas3D userCanvas)(Code) | | Creates a default viewer object. The default values are used to create
the PhysicalBody and PhysicalEnvironment. The View is created
with a front clip distance of 0.1f and a back clip distance of 10.0f.
Parameters: userCanvas - the Canvas3D object to be used for rendering;if this is null then a single RGB, double buffered and depth bufferedCanvas3D object is created since: Java3D 1.1 |
Viewer | public Viewer(Canvas3D[] userCanvases)(Code) | | Creates a default viewer object. The default values are used to create
the PhysicalBody and PhysicalEnvironment. The View is created
with a front clip distance of 0.1f and a back clip distance of 10.0f.
Parameters: userCanvases - the Canvas3D objects to be used for rendering;if this is null then a single RGB, double buffered and depth bufferedCanvas3D object is created since: Java3D 1.3 |
Viewer | public Viewer(Canvas3D[] userCanvases, PhysicalBody userBody, PhysicalEnvironment userEnvironment, boolean setVisible)(Code) | | Creates a viewer object. The Canvas3D objects, PhysicalEnvironment, and
PhysicalBody are taken from the arguments.
Parameters: userCanvases - the Canvas3D objects to be used for rendering;if this is null then a single RGB, double buffered and depth bufferedCanvas3D object is created Parameters: userBody - the PhysicalBody to use for this Viewer; if it isnull, a default PhysicalBody object is created Parameters: userEnvironment - the PhysicalEnvironment to use for this Viewer;if it is null, a default PhysicalEnvironment object is created Parameters: setVisible - determines if the Frames should be set to visible once created since: Java3D 1.3 |
Viewer | public Viewer(URL userConfig)(Code) | | Creates a default Viewer object. The default values are used to create
the PhysicalEnvironment and PhysicalBody. A single RGB, double buffered
and depth buffered Canvas3D object is created. The View is created
with a front clip distance of 0.1f and a back clip distance of 10.0f.
Parameters: userConfig - the URL of the user configuration file used toinitialize the PhysicalBody object; this is always ignored since: Java3D 1.1 |
Viewer | public Viewer(Canvas3D userCanvas, URL userConfig)(Code) | | Creates a default viewer object. The default values are used to create
the PhysicalEnvironment and PhysicalBody. The View is created
with a front clip distance of 0.1f and a back clip distance of 10.0f.
Parameters: userCanvas - the Canvas3D object to be used for rendering;if this is null then a single RGB, double buffered and depth bufferedCanvas3D object is created Parameters: userConfig - the URL of the user configuration file used toinitialize the PhysicalBody object; this is always ignored since: Java3D 1.1 |
Viewer | Viewer(ConfigScreen[] cs, ConfigView cv, boolean setVisible)(Code) | | Package-scoped constructor to create a Viewer from the configuration
objects provided by ConfiguredUniverse.
Parameters: cs - array of ConfigScreen objects containing configurationinformation for the physical screens in the environment Parameters: cv - ConfigView object containing configuration information aboutthe view to be created using the given screens Parameters: setVisible - if true, call setVisible(true) on all created Windowcomponents; otherwise, they remain invisible |
addWindowCloseListener | void addWindowCloseListener(Window win)(Code) | | |
clearViewerMap | public static void clearViewerMap()(Code) | | Removes all Viewer mappings from the Viewer map.
Note: This method is targeted for SUN framebuffer XVR-4000 and later
hardware that support video size extension.
since: Java 3D 1.3.1 |
createAudioDevice | public AudioDevice createAudioDevice()(Code) | | Used to create and initialize a default AudioDevice3D used for sound
rendering.
reference to created AudioDevice, or null if error occurs. |
getAvatar | public ViewerAvatar getAvatar()(Code) | | Gets the geometry associated with the viewer's avatar. The
avatar is the geometry used to represent the viewer in the virtual
world.
The root of the scene graph that is used to represent theviewer's avatar. |
getCanvas3D | public Canvas3D getCanvas3D()(Code) | | Returns the 0th Canvas3D object associated with this Viewer object
a reference to the 0th Canvas3D object associated with thisViewer object since: Java3D 1.3 |
getCanvas3D | public Canvas3D getCanvas3D(int canvasNum)(Code) | | Returns the Canvas3D object at the specified index associated with
this Viewer object.
Parameters: canvasNum - the index of the Canvas3D object to retrieve;if there is no Canvas3D object for the given index, null is returned a reference to a Canvas3D object associated with thisViewer object since: Java3D 1.3 |
getCanvas3Ds | public Canvas3D[] getCanvas3Ds()(Code) | | Returns all the Canvas3D objects associated with this Viewer object.
an array of references to the Canvas3D objects associated withthis Viewer object since: Java3D 1.3 |
getCanvases | public Canvas3D getCanvases()(Code) | | Returns the canvas associated with this Viewer object.
|
getDvrFactor | public float getDvrFactor()(Code) | | Retrieves the dynamic video resize factor of this
viewer.
Note: This method is targeted for SUN framebuffer XVR-4000 and later
hardware that support video size extension.
since: Java 3D 1.3.1 |
getDvrResizeCompensationEnable | public boolean getDvrResizeCompensationEnable()(Code) | | Returns a status flag indicating whether or not dynamic video resize
compensation is enabled.
Note: This method is targeted for SUN framebuffer XVR-4000 and later
hardware that support video size extension.
since: Java 3D 1.3.1 |
getJFrame | public JFrame getJFrame(int frameNum)(Code) | | Returns the JFrame object created by this Viewer object at the
specified index. If a Viewer is constructed without any Canvas3D
objects then the Viewer object will create a Canva3D object, a JPanel
containing the Canvas3D object, and a JFrame to place the JPanel in.
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.
Parameters: frameNum - the index of the JFrame object to retrieve;if there is no JFrame object for the given index, null is returned a reference to JFrame object created by this Viewer object since: Java3D 1.3 |
getJFrames | public JFrame[] getJFrames()(Code) | | Returns all the JFrames created by this Viewer object. If a Viewer is
constructed without any Canvas3D objects then the Viewer object will
create a Canva3D object, a JPanel containing the Canvas3D object, and a
JFrame to place the JPanel in.
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.
an array of references to the JFrame objects created bythis Viewer object, or null if no JFrame objects were created since: Java3D 1.3 |
getJPanel | public JPanel getJPanel(int panelNum)(Code) | | Returns the JPanel object created by this Viewer object at the
specified index. If a Viewer is constructed without any Canvas3D
objects then the Viewer object will create a Canva3D object and a
JPanel into which to place the Canvas3D object.
Parameters: panelNum - the index of the JPanel object to retrieve;if there is no JPanel object for the given index, null is returned a reference to a JPanel object created by this Viewer object since: Java3D 1.3 |
getJPanels | public JPanel[] getJPanels()(Code) | | Returns all the JPanel objects created by this Viewer object. If a
Viewer is constructed without any Canvas3D objects then the Viewer
object will create a Canva3D object and a JPanel into which to place
the Canvas3D object.
an array of references to the JPanel objects created bythis Viewer object, or null or no JPanel objects were created since: Java3D 1.3 |
getPhysicalBody | public PhysicalBody getPhysicalBody()(Code) | | Returns the PhysicalBody object associated with the Viewer object.
A reference to the PhysicalBody object. |
getPhysicalEnvironment | public PhysicalEnvironment getPhysicalEnvironment()(Code) | | Returns the PhysicalEnvironment object associated with the Viewer
object.
A reference to the PhysicalEnvironment object. |
getUniverse | public SimpleUniverse getUniverse()(Code) | | Returns the Universe to which this Viewer is attached
the Universe to which this Viewer is attached since: Java 3D 1.3 |
getView | public View getView()(Code) | | Returns the View object associated with the Viewer object.
The View object of this Viewer. |
getViewer | public static Viewer getViewer(View view)(Code) | | Get the Viewer associated with the view object.
Parameters: view - The View object for inquiry. The Viewer object associated with this View object. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension. since: Java 3D 1.3.1 |
getViewingPlatform | public ViewingPlatform getViewingPlatform()(Code) | | Get the ViewingPlatform object used by this Viewer.
The ViewingPlatform object used by thisViewer object. |
isDvrEnabled | public boolean isDvrEnabled()(Code) | | Returns a status flag indicating whether or not dynamic video size
is enabled.
Note: This method is targeted for SUN framebuffer XVR-4000 and later
hardware that support video size extension.
since: Java 3D 1.3.1 |
removeViewerMapEntry | public static Viewer removeViewerMapEntry(View view)(Code) | | Removes the entry associated with the view object.
Parameters: view - The View object to be removed. The Viewer object associated with this View object. Note: This method is targeted for SUN framebuffer XVR-4000 and later hardware that support video size extension. since: Java 3D 1.3.1 |
setAvatar | public void setAvatar(ViewerAvatar avatar)(Code) | | Sets the geometry to be associated with the viewer's avatar. The
avatar is the geometry used to represent the viewer in the virtual
world.
Parameters: avatar - The geometry to associate with this Viewer object.Passing in null will cause any geometry associated with the Viewerto be removed from the scen graph. |
setDvrEnable | public void setDvrEnable(boolean dvr)(Code) | | Turns on or off dynamic video size.
Note: This method is targeted for SUN framebuffer XVR-4000 and later
hardware that support video size extension.
Parameters: dvr - enables or disables dynamic video size. since: Java 3D 1.3.1 |
setDvrFactor | public void setDvrFactor(float dvr)(Code) | | Set the dynamic video resize factor for this viewer.
Note: This method is targeted for SUN framebuffer XVR-4000 and later
hardware that support video size extension.
Parameters: dvr - set the dynamic video resize factor for this viewer. since: Java 3D 1.3.1 |
setDvrResizeCompensationEnable | public void setDvrResizeCompensationEnable(boolean dvrRCE)(Code) | | Turns on or off dynamic video resize compensation.
Note: This method is targeted for SUN framebuffer XVR-4000 and later
hardware that support video size extension.
Parameters: dvrRCE - enables or disables dynamic video resize compensation. since: Java 3D 1.3.1 |
setViewingPlatform | public void setViewingPlatform(ViewingPlatform platform)(Code) | | Set the ViewingPlatform object used by this Viewer.
Parameters: platform - The ViewingPlatform object to set for thisViewer object. Use null to unset the current value andnot assign assign a new ViewingPlatform object. |
setVisible | public void setVisible(boolean visible)(Code) | | Call setVisible() on all Window components created by this Viewer.
Parameters: visible - boolean to be passed to the setVisible() calls on theWindow components created by this Viewer since: Java3D 1.3 |
|
|
|