visad.java3d
Class DisplayImplJ3D

java.lang.Object
  extended by visad.ActionImpl
      extended by visad.DisplayImpl
          extended by visad.java3d.DisplayImplJ3D
All Implemented Interfaces:
Runnable, EventListener, Action, Display, LocalDisplay, ThingChangedListener

public class DisplayImplJ3D
extends DisplayImpl

DisplayImplJ3D is the VisAD class for displays that use Java 3D. It is runnable.

DisplayImplJ3D is not Serializable and should not be copied between JVMs.


Nested Class Summary
 
Nested classes/interfaces inherited from class visad.DisplayImpl
DisplayImpl.Syncher
 
Field Summary
static int APPLETFRAME
          Field for specifying that the DisplayImpl be created in an Applet
static float BACK2D
          distance behind for surfaces in 2-D mode
static int FASTEST
          Use the fastest available method for transparency.
static boolean GEOMETRY_BY_REF
          Indicates whether to use geometry by reference when creating geometry arrays.
static int JPANEL
          Field for specifying that the DisplayImpl be created in a JPanel
static int NICEST
          Use the nicest available method for transparency.
static int OFFSCREEN
          Field for specifying that the DisplayImpl does not have a screen Component
static int PARALLEL_PROJECTION
          Use a parallel projection view
static int PERSPECTIVE_PROJECTION
          Use a perspective projection view.
static int POLYGON_FILL
          Render polygonal primitives by filling the interior of the polygon
static int POLYGON_LINE
          Render polygonal primitives as lines drawn between consecutive vertices of the polygon.
static int POLYGON_POINT
          Render polygonal primitives as points drawn at the vertices of the polygon.
static String PROP_GEOMETRY_BY_REF
          Property name for setting whether to use geometry by reference.
static String PROP_TEXTURE_NPOT
          Property name for enabling the use of non-power of two textures.
static boolean TEXTURE_NPOT
          Indicates whether to allow non-power of two textures.
static int TRANSFORM_ONLY
          Field for specifying that the DisplayImpl transforms but does not render
static int UNKNOWN
          Field for specifying unknown API type
 
Fields inherited from class visad.ActionImpl
TRACE_STACK, TRACE_TIME
 
Fields inherited from interface visad.Display
AdjustProjectionSeam, Alpha, Animation, Blue, CacheAppearances, CMY, ColorMode, components3c, components3s, componentscmy, componentscyl, componentsflow1, componentsflow1s, componentsflow2, componentsflow2s, componentshsv, componentsrgb, componentsso, CurvedSize, Cyan, CylAzimuth, CylRadius, CylZAxis, DisplayCMYCoordSys, DisplayCMYTuple, DisplayCylindricalCoordSys, DisplayFlow1SphericalCoordSys, DisplayFlow1SphericalTuple, DisplayFlow1Tuple, DisplayFlow2SphericalCoordSys, DisplayFlow2SphericalTuple, DisplayFlow2Tuple, DisplayHSVCoordSys, DisplayHSVTuple, DisplayRealArray, DisplayRGBTuple, DisplaySpatialCartesianTuple, DisplaySpatialCylindricalTuple, DisplaySpatialOffsetTuple, DisplaySpatialSphericalTuple, DisplaySphericalCoordSys, Flow1Azimuth, Flow1Elevation, Flow1Radial, Flow1X, Flow1Y, Flow1Z, Flow2Azimuth, Flow2Elevation, Flow2Radial, Flow2X, Flow2Y, Flow2Z, Green, HSV, Hue, IsoContour, Latitude, LineStyle, LineWidth, List, Longitude, Magenta, MergeGeometries, MissingTransparent, PointMode, PointSize, PolygonMode, PolygonOffset, PolygonOffsetFactor, Radius, Red, RGB, RGBA, Saturation, SelectRange, SelectValue, Shape, ShapeScale, Text, Texture3DMode, TextureEnable, Value, XAxis, XAxisOffset, YAxis, YAxisOffset, Yellow, ZAxis, ZAxisOffset
 
Constructor Summary
DisplayImplJ3D(RemoteDisplay rmtDpy)
           
DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer)
           
DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, GraphicsConfiguration config)
           
DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, int api)
           
DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, int api, GraphicsConfiguration config)
           
DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, int api, GraphicsConfiguration config, VisADCanvasJ3D c)
          the 'c' argument is intended to be an extension class of VisADCanvasJ3D (or null); if it is non-null, then api must be JPANEL and its super() constructor for VisADCanvasJ3D must be 'super(renderer, config)'
DisplayImplJ3D(RemoteDisplay rmtDpy, GraphicsConfiguration config)
           
DisplayImplJ3D(RemoteDisplay rmtDpy, int api)
           
DisplayImplJ3D(RemoteDisplay rmtDpy, int api, GraphicsConfiguration config)
           
DisplayImplJ3D(String name)
          construct a DisplayImpl for Java3D with the default DisplayRenderer, in a JFC JPanel
DisplayImplJ3D(String name, DisplayRendererJ3D renderer)
          construct a DisplayImpl for Java3D with a non-default DisplayRenderer, in a JFC JPanel
DisplayImplJ3D(String name, DisplayRendererJ3D renderer, GraphicsConfiguration config)
          construct a DisplayImpl for Java3D with a non-default DisplayRenderer and GraphicsConfiguration, in a JFC JPanel
DisplayImplJ3D(String name, DisplayRendererJ3D renderer, int api)
          construct a DisplayImpl for Java3D with a non-default DisplayRenderer; in a JFC JPanel if api == DisplayImplJ3D.JPANEL and in an AppletFrame if api == DisplayImplJ3D.APPLETFRAME
DisplayImplJ3D(String name, DisplayRendererJ3D renderer, int api, GraphicsConfiguration config)
           
DisplayImplJ3D(String name, DisplayRendererJ3D renderer, int api, GraphicsConfiguration config, VisADCanvasJ3D c)
          the 'c' argument is intended to be an extension class of VisADCanvasJ3D (or null); if it is non-null, then api must be JPANEL and its super() constructor for VisADCanvasJ3D must be 'super(renderer, config)'
DisplayImplJ3D(String name, DisplayRendererJ3D renderer, int width, int height)
          constructor for off screen
DisplayImplJ3D(String name, DisplayRendererJ3D renderer, int width, int height, VisADCanvasJ3D c)
          constructor for off screen; the 'c' argument is intended to be an extension class of VisADCanvasJ3D (or null); if it is non-null, then its super() constructor for VisADCanvasJ3D must be 'super(renderer, width, height)'
DisplayImplJ3D(String name, GraphicsConfiguration config)
          construct a DisplayImpl for Java3D with a non-default GraphicsConfiguration, in a JFC JPanel
DisplayImplJ3D(String name, int api)
          constructor with default DisplayRenderer
DisplayImplJ3D(String name, int api, GraphicsConfiguration config)
          constructor with default DisplayRenderer and a non-default GraphicsConfiguration
DisplayImplJ3D(String name, int width, int height)
          constructor for off screen
 
Method Summary
 void destroy()
          destroy this display: clear all references to objects (so they can be garbage collected), stop all Threads and remove all links
 void destroyUniverse()
           
 int getAPI()
          Return the API used for this display
 DisplayAppletJ3D getApplet()
          Return the applet associated with this display
protected  DisplayRenderer getDefaultDisplayRenderer()
          return a DefaultDisplayRendererJ3D
 GraphicsModeControl getGraphicsModeControl()
          Get the graphics mode control associated with this display
 ProjectionControl getProjectionControl()
          Get the projection control associated with this display
 GeometryArray makeGeometry(VisADGeometryArray vga)
           
 void setScreenAspect(double height, double width)
           
 
Methods inherited from class visad.DisplayImpl
addActivityHandler, addControl, addDataSourceListener, addDisplayListener, addMap, addMap, addMessageListener, addReference, addReference, addReferences, addReferences, addReferences, addReferences, addRemoteSourceListener, addRendererSourceListener, addSlave, checkTicks, clearMaps, connectionFailed, controlChanged, delay, disableEvent, doAction, enableEvent, equals, finalize, getComponent, getConnectionID, getConstantMapVector, getControl, getControl, getControls, getControlVector, getDisplayMonitor, getDisplayRenderer, getDisplayScalar, getDisplayScalarCount, getDisplayScalarIndex, getDisplaySync, getImage, getImage, getMapVector, getMouseBehavior, getNumberOfControls, getPrintable, getRenderers, getRendererVector, getScalar, getScalarCount, getScalarIndex, getValueArrayLength, getValueToMap, getValueToScalar, getWidgetPanel, hasSlaves, isDestroyed, isEventEnabled, lostCollabConnection, make_matrix, multiply_matrix, notifyListeners, notifyListeners, printStack, reAutoScale, reDisplayAll, removeActivityHandler, removeAllReferences, removeAllSlaves, removeDataSourceListener, removeDisplayListener, removeMap, removeMap, removeMessageListener, removeReference, removeRemoteSourceListener, removeRendererSourceListener, removeSlave, replaceReference, replaceReference, replaceReferences, replaceReferences, replaceReferences, replaceReferences, sendMessage, setAlwaysAutoScale, setComponent, setMouseBehavior, syncRemoteData, toString, toString, updateBusyStatus, updateSlaves, updateSlaves
 
Methods inherited from class visad.ActionImpl
disableAction, enableAction, findReference, getCurrentActionThread, getLinks, getName, getTaskCount, printPool, run, setEnabled, setName, setThreadPoolMaximum, stop, stopThreadPool, thingChanged, waitForTasks
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface visad.Action
getName
 
Methods inherited from interface visad.ThingChangedListener
thingChanged
 

Field Detail

BACK2D

public static final float BACK2D
distance behind for surfaces in 2-D mode

See Also:
Constant Field Values

PARALLEL_PROJECTION

public static final int PARALLEL_PROJECTION
Use a parallel projection view

See Also:
GraphicsModeControlJ3D.setProjectionPolicy(int), Constant Field Values

PERSPECTIVE_PROJECTION

public static final int PERSPECTIVE_PROJECTION
Use a perspective projection view. This is the default.

See Also:
GraphicsModeControlJ3D.setProjectionPolicy(int), Constant Field Values

POLYGON_FILL

public static final int POLYGON_FILL
Render polygonal primitives by filling the interior of the polygon

See Also:
GraphicsModeControlJ3D.setPolygonMode(int), Constant Field Values

POLYGON_LINE

public static final int POLYGON_LINE
Render polygonal primitives as lines drawn between consecutive vertices of the polygon.

See Also:
GraphicsModeControlJ3D.setPolygonMode(int), Constant Field Values

POLYGON_POINT

public static final int POLYGON_POINT
Render polygonal primitives as points drawn at the vertices of the polygon.

See Also:
GraphicsModeControlJ3D.setPolygonMode(int), Constant Field Values

NICEST

public static final int NICEST
Use the nicest available method for transparency.

See Also:
GraphicsModeControlJ3D.setTransparencyMode(int), Constant Field Values

FASTEST

public static final int FASTEST
Use the fastest available method for transparency.

See Also:
GraphicsModeControlJ3D.setTransparencyMode(int), Constant Field Values

UNKNOWN

public static final int UNKNOWN
Field for specifying unknown API type

See Also:
Constant Field Values

JPANEL

public static final int JPANEL
Field for specifying that the DisplayImpl be created in a JPanel

See Also:
Constant Field Values

OFFSCREEN

public static final int OFFSCREEN
Field for specifying that the DisplayImpl does not have a screen Component

See Also:
Constant Field Values

APPLETFRAME

public static final int APPLETFRAME
Field for specifying that the DisplayImpl be created in an Applet

See Also:
Constant Field Values

TRANSFORM_ONLY

public static final int TRANSFORM_ONLY
Field for specifying that the DisplayImpl transforms but does not render

See Also:
Constant Field Values

PROP_GEOMETRY_BY_REF

public static final String PROP_GEOMETRY_BY_REF
Property name for setting whether to use geometry by reference.

See Also:
GEOMETRY_BY_REF, Constant Field Values

GEOMETRY_BY_REF

public static final boolean GEOMETRY_BY_REF
Indicates whether to use geometry by reference when creating geometry arrays.

See Also:
GeometryArray.BY_REFERENCE

PROP_TEXTURE_NPOT

public static final String PROP_TEXTURE_NPOT
Property name for enabling the use of non-power of two textures.

See Also:
TEXTURE_NPOT, Constant Field Values

TEXTURE_NPOT

public static final boolean TEXTURE_NPOT
Indicates whether to allow non-power of two textures. This has been known to cause some issues with Apple 32bit Macs eventhough the Canvas3D properties indicate that NPOT is supported.

See Also:
Canvas3D.queryProperties()
Constructor Detail

DisplayImplJ3D

public DisplayImplJ3D(String name)
               throws VisADException,
                      RemoteException
construct a DisplayImpl for Java3D with the default DisplayRenderer, in a JFC JPanel

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      DisplayRendererJ3D renderer)
               throws VisADException,
                      RemoteException
construct a DisplayImpl for Java3D with a non-default DisplayRenderer, in a JFC JPanel

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      int api)
               throws VisADException,
                      RemoteException
constructor with default DisplayRenderer

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      GraphicsConfiguration config)
               throws VisADException,
                      RemoteException
construct a DisplayImpl for Java3D with a non-default GraphicsConfiguration, in a JFC JPanel

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      DisplayRendererJ3D renderer,
                      int api)
               throws VisADException,
                      RemoteException
construct a DisplayImpl for Java3D with a non-default DisplayRenderer; in a JFC JPanel if api == DisplayImplJ3D.JPANEL and in an AppletFrame if api == DisplayImplJ3D.APPLETFRAME

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      DisplayRendererJ3D renderer,
                      GraphicsConfiguration config)
               throws VisADException,
                      RemoteException
construct a DisplayImpl for Java3D with a non-default DisplayRenderer and GraphicsConfiguration, in a JFC JPanel

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      int api,
                      GraphicsConfiguration config)
               throws VisADException,
                      RemoteException
constructor with default DisplayRenderer and a non-default GraphicsConfiguration

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      DisplayRendererJ3D renderer,
                      int api,
                      GraphicsConfiguration config)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      DisplayRendererJ3D renderer,
                      int api,
                      GraphicsConfiguration config,
                      VisADCanvasJ3D c)
               throws VisADException,
                      RemoteException
the 'c' argument is intended to be an extension class of VisADCanvasJ3D (or null); if it is non-null, then api must be JPANEL and its super() constructor for VisADCanvasJ3D must be 'super(renderer, config)'

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      int width,
                      int height)
               throws VisADException,
                      RemoteException
constructor for off screen

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      DisplayRendererJ3D renderer,
                      int width,
                      int height)
               throws VisADException,
                      RemoteException
constructor for off screen

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(String name,
                      DisplayRendererJ3D renderer,
                      int width,
                      int height,
                      VisADCanvasJ3D c)
               throws VisADException,
                      RemoteException
constructor for off screen; the 'c' argument is intended to be an extension class of VisADCanvasJ3D (or null); if it is non-null, then its super() constructor for VisADCanvasJ3D must be 'super(renderer, width, height)'

Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(RemoteDisplay rmtDpy)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(RemoteDisplay rmtDpy,
                      DisplayRendererJ3D renderer)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(RemoteDisplay rmtDpy,
                      int api)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(RemoteDisplay rmtDpy,
                      GraphicsConfiguration config)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(RemoteDisplay rmtDpy,
                      DisplayRendererJ3D renderer,
                      int api)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(RemoteDisplay rmtDpy,
                      DisplayRendererJ3D renderer,
                      GraphicsConfiguration config)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(RemoteDisplay rmtDpy,
                      int api,
                      GraphicsConfiguration config)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(RemoteDisplay rmtDpy,
                      DisplayRendererJ3D renderer,
                      int api,
                      GraphicsConfiguration config)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ3D

public DisplayImplJ3D(RemoteDisplay rmtDpy,
                      DisplayRendererJ3D renderer,
                      int api,
                      GraphicsConfiguration config,
                      VisADCanvasJ3D c)
               throws VisADException,
                      RemoteException
the 'c' argument is intended to be an extension class of VisADCanvasJ3D (or null); if it is non-null, then api must be JPANEL and its super() constructor for VisADCanvasJ3D must be 'super(renderer, config)'

Throws:
VisADException
RemoteException
Method Detail

getDefaultDisplayRenderer

protected DisplayRenderer getDefaultDisplayRenderer()
return a DefaultDisplayRendererJ3D

Specified by:
getDefaultDisplayRenderer in class DisplayImpl
Returns:
the default DisplayRenderer for this DisplayImpl

setScreenAspect

public void setScreenAspect(double height,
                            double width)

getProjectionControl

public ProjectionControl getProjectionControl()
Get the projection control associated with this display

Specified by:
getProjectionControl in interface LocalDisplay
Specified by:
getProjectionControl in class DisplayImpl
Returns:
this display's projection control
See Also:
ProjectionControlJ3D

getGraphicsModeControl

public GraphicsModeControl getGraphicsModeControl()
Get the graphics mode control associated with this display

Specified by:
getGraphicsModeControl in interface LocalDisplay
Specified by:
getGraphicsModeControl in class DisplayImpl
Returns:
this display's graphics mode control
See Also:
GraphicsModeControlJ3D

getApplet

public DisplayAppletJ3D getApplet()
Return the applet associated with this display

Returns:
the applet or null if API != APPLETFRAME

getAPI

public int getAPI()
           throws VisADException
Return the API used for this display

Overrides:
getAPI in class DisplayImpl
Returns:
the mode being used (UNKNOWN, JPANEL, APPLETFRAME, OFFSCREEN, TRANSFORM_ONLY)
Throws:
VisADException

makeGeometry

public GeometryArray makeGeometry(VisADGeometryArray vga)
                           throws VisADException
Throws:
VisADException

destroyUniverse

public void destroyUniverse()

destroy

public void destroy()
             throws VisADException,
                    RemoteException
Description copied from class: DisplayImpl
destroy this display: clear all references to objects (so they can be garbage collected), stop all Threads and remove all links

Specified by:
destroy in interface Display
Overrides:
destroy in class DisplayImpl
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred