visad.java3d
Class DisplayImplJ3D
- java.lang.Object
-
- visad.ActionImpl
-
- visad.DisplayImpl
-
- visad.java3d.DisplayImplJ3D
-
- All Implemented Interfaces:
- java.lang.Runnable, java.util.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
Fields Modifier and Type Field and Description static intAPPLETFRAMEField for specifying that the DisplayImpl be created in an Appletstatic floatBACK2Ddistance behind for surfaces in 2-D modestatic intFASTESTUse the fastest available method for transparency.static booleanGEOMETRY_BY_REFIndicates whether to use geometry by reference when creating geometry arrays.static intJPANELField for specifying that the DisplayImpl be created in a JPanelstatic intNICESTUse the nicest available method for transparency.static java.lang.StringNO_ERASE_BACKGROUNDWorkaround for Java3D "grey window problem": sometimes Canvas3D is not painted This problem is rare and often hard to reproduce, so it is disabled by default.static intOFFSCREENField for specifying that the DisplayImpl does not have a screen Componentstatic intPARALLEL_PROJECTIONUse a parallel projection viewstatic intPERSPECTIVE_PROJECTIONUse a perspective projection view.static intPOLYGON_FILLRender polygonal primitives by filling the interior of the polygonstatic intPOLYGON_LINERender polygonal primitives as lines drawn between consecutive vertices of the polygon.static intPOLYGON_POINTRender polygonal primitives as points drawn at the vertices of the polygon.static java.lang.StringPROP_GEOMETRY_BY_REFProperty name for setting whether to use geometry by reference.static java.lang.StringPROP_TEXTURE_NPOTProperty name for enabling the use of non-power of two textures.static booleanTEXTURE_NPOTIndicates whether to allow non-power of two textures.static intTRANSFORM_ONLYField for specifying that the DisplayImpl transforms but does not renderstatic intUNKNOWNField 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
Constructors Constructor and Description DisplayImplJ3D(RemoteDisplay rmtDpy)DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer)DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, java.awt.GraphicsConfiguration config)DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, int api)DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, int api, java.awt.GraphicsConfiguration config)DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, int api, java.awt.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, java.awt.GraphicsConfiguration config)DisplayImplJ3D(RemoteDisplay rmtDpy, int api)DisplayImplJ3D(RemoteDisplay rmtDpy, int api, java.awt.GraphicsConfiguration config)DisplayImplJ3D(java.lang.String name)construct a DisplayImpl for Java3D with the default DisplayRenderer, in a JFC JPanelDisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer)construct a DisplayImpl for Java3D with a non-default DisplayRenderer, in a JFC JPanelDisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer, java.awt.GraphicsConfiguration config)construct a DisplayImpl for Java3D with a non-default DisplayRenderer and GraphicsConfiguration, in a JFC JPanelDisplayImplJ3D(java.lang.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.APPLETFRAMEDisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer, int api, java.awt.GraphicsConfiguration config)DisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer, int api, java.awt.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(java.lang.String name, DisplayRendererJ3D renderer, int width, int height)constructor for off screenDisplayImplJ3D(java.lang.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(java.lang.String name, java.awt.GraphicsConfiguration config)construct a DisplayImpl for Java3D with a non-default GraphicsConfiguration, in a JFC JPanelDisplayImplJ3D(java.lang.String name, int api)constructor with default DisplayRendererDisplayImplJ3D(java.lang.String name, int api, java.awt.GraphicsConfiguration config)constructor with default DisplayRenderer and a non-default GraphicsConfigurationDisplayImplJ3D(java.lang.String name, int width, int height)constructor for off screen
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddestroy()destroy this display: clear all references to objects (so they can be garbage collected), stop all Threads and remove all linksvoiddestroyUniverse()intgetAPI()Return the API used for this displayDisplayAppletJ3DgetApplet()Return the applet associated with this displayGraphicsModeControlgetGraphicsModeControl()Get the graphics mode control associated with this displayProjectionControlgetProjectionControl()Get the projection control associated with this displayjavax.media.j3d.GeometryArraymakeGeometry(VisADGeometryArray vga)voidresetDepthBufferOffsets()voidsetDepthBufferOffset(DataRenderer renderer, GraphicsModeControl mode)Sets the depth buffer offset when autoDepthOffset is enabled for this display.voidsetScreenAspect(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, 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, 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
getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
-
PERSPECTIVE_PROJECTION
public static final int PERSPECTIVE_PROJECTION
Use a perspective projection view. This is the default.
-
POLYGON_FILL
public static final int POLYGON_FILL
Render polygonal primitives by filling the interior of the polygon
-
POLYGON_LINE
public static final int POLYGON_LINE
Render polygonal primitives as lines drawn between consecutive vertices of the polygon.
-
POLYGON_POINT
public static final int POLYGON_POINT
Render polygonal primitives as points drawn at the vertices of the polygon.
-
NICEST
public static final int NICEST
Use the nicest available method for transparency.
-
FASTEST
public static final int FASTEST
Use the fastest available method for transparency.
-
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 java.lang.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 java.lang.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()
-
NO_ERASE_BACKGROUND
public static final java.lang.String NO_ERASE_BACKGROUND
Workaround for Java3D "grey window problem": sometimes Canvas3D is not painted This problem is rare and often hard to reproduce, so it is disabled by default.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name) throws VisADException, java.rmi.RemoteExceptionconstruct a DisplayImpl for Java3D with the default DisplayRenderer, in a JFC JPanel- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer) throws VisADException, java.rmi.RemoteExceptionconstruct a DisplayImpl for Java3D with a non-default DisplayRenderer, in a JFC JPanel- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, int api) throws VisADException, java.rmi.RemoteExceptionconstructor with default DisplayRenderer- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, java.awt.GraphicsConfiguration config) throws VisADException, java.rmi.RemoteExceptionconstruct a DisplayImpl for Java3D with a non-default GraphicsConfiguration, in a JFC JPanel- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer, int api) throws VisADException, java.rmi.RemoteExceptionconstruct 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:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer, java.awt.GraphicsConfiguration config) throws VisADException, java.rmi.RemoteExceptionconstruct a DisplayImpl for Java3D with a non-default DisplayRenderer and GraphicsConfiguration, in a JFC JPanel- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, int api, java.awt.GraphicsConfiguration config) throws VisADException, java.rmi.RemoteExceptionconstructor with default DisplayRenderer and a non-default GraphicsConfiguration- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer, int api, java.awt.GraphicsConfiguration config) throws VisADException, java.rmi.RemoteException- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer, int api, java.awt.GraphicsConfiguration config, VisADCanvasJ3D c) throws VisADException, java.rmi.RemoteExceptionthe '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:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, int width, int height) throws VisADException, java.rmi.RemoteExceptionconstructor for off screen- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer, int width, int height) throws VisADException, java.rmi.RemoteExceptionconstructor for off screen- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(java.lang.String name, DisplayRendererJ3D renderer, int width, int height, VisADCanvasJ3D c) throws VisADException, java.rmi.RemoteExceptionconstructor 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:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(RemoteDisplay rmtDpy) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(RemoteDisplay rmtDpy, int api) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(RemoteDisplay rmtDpy, java.awt.GraphicsConfiguration config) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, int api) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, java.awt.GraphicsConfiguration config) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(RemoteDisplay rmtDpy, int api, java.awt.GraphicsConfiguration config) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, int api, java.awt.GraphicsConfiguration config) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
DisplayImplJ3D
public DisplayImplJ3D(RemoteDisplay rmtDpy, DisplayRendererJ3D renderer, int api, java.awt.GraphicsConfiguration config, VisADCanvasJ3D c) throws VisADException, java.rmi.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:
VisADExceptionjava.rmi.RemoteException
-
-
Method Detail
-
setScreenAspect
public void setScreenAspect(double height, double width)
-
getProjectionControl
public ProjectionControl getProjectionControl()
Get the projection control associated with this display- Specified by:
getProjectionControlin interfaceLocalDisplay- Specified by:
getProjectionControlin classDisplayImpl- Returns:
- this display's projection control
- See Also:
ProjectionControlJ3D
-
getGraphicsModeControl
public GraphicsModeControl getGraphicsModeControl()
Get the graphics mode control associated with this display- Specified by:
getGraphicsModeControlin interfaceLocalDisplay- Specified by:
getGraphicsModeControlin classDisplayImpl- 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 VisADExceptionReturn the API used for this display- Overrides:
getAPIin classDisplayImpl- Returns:
- the mode being used (UNKNOWN, JPANEL, APPLETFRAME, OFFSCREEN, TRANSFORM_ONLY)
- Throws:
VisADException
-
makeGeometry
public javax.media.j3d.GeometryArray makeGeometry(VisADGeometryArray vga) throws VisADException
- Throws:
VisADException
-
destroyUniverse
public void destroyUniverse()
-
destroy
public void destroy() throws VisADException, java.rmi.RemoteExceptionDescription copied from class:DisplayImpldestroy this display: clear all references to objects (so they can be garbage collected), stop all Threads and remove all links- Specified by:
destroyin interfaceDisplay- Overrides:
destroyin classDisplayImpl- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
setDepthBufferOffset
public void setDepthBufferOffset(DataRenderer renderer, GraphicsModeControl mode)
Sets the depth buffer offset when autoDepthOffset is enabled for this display.- Overrides:
setDepthBufferOffsetin classDisplayImpl- Parameters:
renderer-mode-
-
resetDepthBufferOffsets
public void resetDepthBufferOffsets()
-
-
DMelt 3.0 © DataMelt by jWork.ORG