visad.java3d
Class GraphicsModeControlJ3D
- java.lang.Object
-
- visad.Control
-
- visad.GraphicsModeControl
-
- visad.java3d.GraphicsModeControlJ3D
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class GraphicsModeControlJ3D extends GraphicsModeControl
GraphicsModeControlJ3D is the VisAD class for controlling various mode settings for rendering.A GraphicsModeControlJ3D is not linked to any DisplayRealType or ScalarMap. It is linked to a DisplayImpl.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class visad.GraphicsModeControl
AVERAGE_COLOR_MODE, DASH_DOT_STYLE, DASH_STYLE, DOT_STYLE, SOLID_STYLE, STACK2D, SUM_COLOR_MODE, TEXTURE3D
-
-
Constructor Summary
Constructors Constructor and Description GraphicsModeControlJ3D(DisplayImpl d)Construct a GraphicsModeControlJ3D associated with the input display
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()clone this GraphicsModeControlJ3Dbooleanequals(java.lang.Object o)Check to see if this GraphicsModeControlJ3D is equal to the object in question.booleangetAdjustProjectionSeam()See whether VisADGeometryArray.adjustLongitude/Seam should be called.booleangetAutoDepthOffsetEnable()booleangetCacheAppearances()Get whether Appearances are cached or notintgetColorMode()Get the color mode used for combining color values.intgetCurvedSize()Get the undersampling factor of surface shape for curved texture mapsbooleangetDepthBufferEnable()floatgetDepthOffsetIncrement()intgetLineStyle()Get the current line style used for LineAttributes.floatgetLineWidth()Get the current line width used for LineAttributes.booleangetMergeGeometries()Set whether Geometries for shapes should be merged into GroupbooleangetMissingTransparent()See whether missing values are rendered as transparent or not.booleangetMode2D()See if the display is being rendered in 2D modeintgetNumRenderersWithDepthOffset()booleangetPointMode()Gets the point mode.floatgetPointSize()Get the current point size used for PointAttributes.intgetPolygonMode()Get the current polygon rasterization mode.floatgetPolygonOffset()Get the current polygon offset.floatgetPolygonOffsetFactor()Get the current polygon offset factor.intgetProjectionPolicy()Get the current projection policy for the display.booleangetScaleEnable()Get whether display scales are enabled or notbooleangetSceneAntialiasingEnable()Get the current antialiasing flag for the display.intgetTexture3DMode()Get the mode for Texture3D for volume renderingbooleangetTextureEnable()See if texture mapping is enabled or notintgetTransparencyMode()Get the current transparency modevoidsetAdjustProjectionSeam(boolean adjust)Set whether VisADGeometryArray.adjustLongitude/adjustSeam should be called.voidsetAutoDepthOffsetEnable(boolean enable)AutoDepthOffset: automatically offsets (pushes back) z-buffer depth for flat surfaces with first farthest back and successive separated by a constant increment toward front.voidsetAutoDepthOffsetEnable(boolean enable, boolean noChange)voidsetCacheAppearances(boolean cache)Set whether the Appearances are reusedvoidsetColorMode(int mode)Set the color mode used for combining color values.voidsetCurvedSize(int curved_size)Set the undersampling factor of surface shape for curved texture mapsvoidsetDepthBufferEnable(boolean enable)voidsetDepthBufferEnable(boolean enable, boolean noChange)voidsetDepthOffsetIncrement(float inc, boolean noChange)Set the depth increment between successive flat surfaces in the autoDepthOffset stack.voidsetLineStyle(int style)Set the line style used for LineAttributes.voidsetLineStyle(int style, boolean noChange)Set the line style used for LineAttributes.voidsetLineWidth(float width)Set the line width used for LineAttributes.voidsetLineWidth(float width, boolean noChange)Set the line width used for LineAttributes.voidsetMergeGeometries(boolean merge)Set whether Geometries for shapes should be merged into Group if possible to reduce memory use.voidsetMissingTransparent(boolean missing)Set the transparency of missing values.voidsetNumRenderersWithDepthOffset(int numWith, boolean noChange)Set the maximum number of DataRenderers in the autoDepthOffset stack.voidsetPointMode(boolean mode)Sets the point mode and updates the display.voidsetPointSize(float size)Set the point size used for PointAttributes.voidsetPointSize(float size, boolean noChange)Set the point size used for PointAttributes.voidsetPolygonMode(int mode)Sets the polygon rasterization mode.voidsetPolygonMode(int mode, boolean noChange)Sets the polygon rasterization mode.voidsetPolygonOffset(float polygonOffset)Sets the polygon offset and updates the display.voidsetPolygonOffset(float polygonOffset, boolean noChange)Sets the polygon offset.voidsetPolygonOffsetFactor(float polygonOffsetFactor)Sets the polygon offset factor and updates the display.voidsetPolygonOffsetFactor(float polygonOffsetFactor, boolean noChange)Sets the polygon offset factor, does not update display.voidsetProjectionPolicy(int policy)Sets the projection policy for the display.voidsetScaleEnable(boolean enable)Toggle the axis scales in the displayvoidsetSceneAntialiasingEnable(boolean flag)Sets the antialiasing flag for the display.voidsetTexture3DMode(int mode)Set the mode for Texture3D for volume renderingvoidsetTextureEnable(boolean enable)Set whether texture mapping should be used or not.voidsetTransparencyMode(int mode)Sets the transparency mode.voidsyncControl(Control rmt)Copy the state of a remote control to this controljava.lang.StringtoString()Return a string representation of this GraphicsModeControlJ3D-
Methods inherited from class visad.GraphicsModeControl
getSaveString, setSaveString
-
Methods inherited from class visad.Control
addControlListener, animation_string, changeControl, checkTicks, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, nullControl, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks
-
-
-
-
Constructor Detail
-
GraphicsModeControlJ3D
public GraphicsModeControlJ3D(DisplayImpl d)
Construct a GraphicsModeControlJ3D associated with the input display- Parameters:
d- display associated with this GraphicsModeControlJ3D
-
-
Method Detail
-
getMode2D
public boolean getMode2D()
See if the display is being rendered in 2D mode- Specified by:
getMode2Din classGraphicsModeControl- Returns:
- true if display is rendered as 2D
- See Also:
DisplayRenderer.getMode2D()
-
getLineWidth
public float getLineWidth()
Get the current line width used for LineAttributes. The default is 1.0.- Specified by:
getLineWidthin classGraphicsModeControl- Returns:
- line width (>= 1.0)
-
setLineWidth
public void setLineWidth(float width) throws VisADException, java.rmi.RemoteExceptionSet the line width used for LineAttributes. Calls changeControl and resets the display.- Specified by:
setLineWidthin classGraphicsModeControl- Parameters:
width- width to use (>= 1.0)- Throws:
VisADException- couldn't set the line width on local displayjava.rmi.RemoteException- couldn't set the line width on remote display
-
setLineWidth
public void setLineWidth(float width, boolean noChange)Set the line width used for LineAttributes. Does not update display.- Specified by:
setLineWidthin classGraphicsModeControl- Parameters:
width- width to use (>= 1.0)noChange- dummy variable
-
getPointSize
public float getPointSize()
Get the current point size used for PointAttributes. The default is 1.0.- Specified by:
getPointSizein classGraphicsModeControl- Returns:
- point size (>= 1.0)
-
setPointSize
public void setPointSize(float size) throws VisADException, java.rmi.RemoteExceptionSet the point size used for PointAttributes. Calls changeControl and updates the display.- Specified by:
setPointSizein classGraphicsModeControl- Parameters:
size- size to use (>= 1.0)- Throws:
VisADException- couldn't set the point size on local displayjava.rmi.RemoteException- couldn't set the point size on remote display
-
setPointSize
public void setPointSize(float size, boolean noChange)Set the point size used for PointAttributes. Doesn't update the display.- Specified by:
setPointSizein classGraphicsModeControl- Parameters:
size- size to use (>= 1.0)noChange- dummy variable
-
getLineStyle
public int getLineStyle()
Get the current line style used for LineAttributes. The default is GraphicsModeControl.SOLID_STYLE.- Specified by:
getLineStylein classGraphicsModeControl- Returns:
- line style (SOLID_STYLE, DASH_STYLE, DOT_STYLE or DASH_DOT_STYLE)
-
setLineStyle
public void setLineStyle(int style) throws VisADException, java.rmi.RemoteExceptionSet the line style used for LineAttributes. Calls changeControl and resets the display.- Specified by:
setLineStylein classGraphicsModeControl- Parameters:
style- style to use (SOLID_STYLE, DASH_STYLE, DOT_STYLE or DASH_DOT_STYLE)- Throws:
VisADException- couldn't set the line style on local displayjava.rmi.RemoteException- couldn't set the line style on remote display
-
setLineStyle
public void setLineStyle(int style, boolean noChange)Set the line style used for LineAttributes. Does not update display.- Specified by:
setLineStylein classGraphicsModeControl- Parameters:
style- style to use (SOLID_STYLE, DASH_STYLE, DOT_STYLE or DASH_DOT_STYLE)noChange- dummy variable
-
getColorMode
public int getColorMode()
Get the color mode used for combining color values. The default is GraphicsModeControl.AVERAGE_COLOR_MODE.- Specified by:
getColorModein classGraphicsModeControl- Returns:
- color mode (AVERAGE_COLOR_MODE or SUM_COLOR_MODE)
-
setColorMode
public void setColorMode(int mode) throws VisADException, java.rmi.RemoteExceptionSet the color mode used for combining color values.- Specified by:
setColorModein classGraphicsModeControl- Parameters:
mode- mode to use (AVERAGE_COLOR_MODE or SUM_COLOR_MODE)- Throws:
VisADException- unable to set color modejava.rmi.RemoteException- unable to set color mode on remote display
-
getPointMode
public boolean getPointMode()
Gets the point mode.- Specified by:
getPointModein classGraphicsModeControl- Returns:
- True if the display is using points rather than connected lines or surfaces for rendering.
-
setPointMode
public void setPointMode(boolean mode) throws VisADException, java.rmi.RemoteExceptionSets the point mode and updates the display.- Specified by:
setPointModein classGraphicsModeControl- Parameters:
mode- true if the display should use points rather than connected lines or surfaces for rendering.- Throws:
VisADException- unable to enable point modejava.rmi.RemoteException- unable to enable point mode on remote display
-
setTextureEnable
public void setTextureEnable(boolean enable) throws VisADException, java.rmi.RemoteExceptionSet whether texture mapping should be used or not.- Specified by:
setTextureEnablein classGraphicsModeControl- Parameters:
enable- true to use texture mapping (the default)- Throws:
VisADException- unable to enable texture mappingjava.rmi.RemoteException- unable to enable texture mapping on remote display
-
getTextureEnable
public boolean getTextureEnable()
See if texture mapping is enabled or not- Specified by:
getTextureEnablein classGraphicsModeControl- Returns:
- true if texture mapping is enabled.
-
setScaleEnable
public void setScaleEnable(boolean enable) throws VisADException, java.rmi.RemoteExceptionToggle the axis scales in the display- Specified by:
setScaleEnablein classGraphicsModeControl- Parameters:
enable- true to enable, false to disable- Throws:
VisADException- couldn't change state of scale enablementjava.rmi.RemoteException- couldn't change state of scale enablement on remote display
-
getScaleEnable
public boolean getScaleEnable()
Get whether display scales are enabled or not- Specified by:
getScaleEnablein classGraphicsModeControl- Returns:
- true if enabled, otherwise false
-
getTransparencyMode
public int getTransparencyMode()
Get the current transparency mode- Specified by:
getTransparencyModein classGraphicsModeControl- Returns:
- DisplayImplJ3D.FASTEST, DisplayImplJ3D.NICEST
-
setTransparencyMode
public void setTransparencyMode(int mode) throws VisADException, java.rmi.RemoteExceptionSets the transparency mode.- Specified by:
setTransparencyModein classGraphicsModeControl- Parameters:
mode- transparency mode to use. Legal values are DisplayImplJ3D.FASTEST, DisplayImplJ3D.NICEST- Throws:
VisADException- bad mode or couldn't create necessary VisAD objectjava.rmi.RemoteException- couldn't create necessary remote object
-
setProjectionPolicy
public void setProjectionPolicy(int policy) throws VisADException, java.rmi.RemoteExceptionSets the projection policy for the display. PARALLEL_PROJECTION will display a parallel view while PERSPECTIVE_PROJECTION will create a perspective view. The default is a perspective view.- Specified by:
setProjectionPolicyin classGraphicsModeControl- Parameters:
policy- policy to be used (DisplayImplJ3D.PARALLEL_PROJECTION or DisplayImplJ3D.PERSPECTIVE_PROJECTION- Throws:
VisADException- bad policy or can't create the necessary VisAD objectjava.rmi.RemoteException- change policy on remote display
-
getProjectionPolicy
public int getProjectionPolicy()
Get the current projection policy for the display.- Specified by:
getProjectionPolicyin classGraphicsModeControl- Returns:
- DisplayImplJ3D.PARALLEL_PROJECTION or DisplayImplJ3D.PERSPECTIVE_PROJECTION
-
setSceneAntialiasingEnable
public void setSceneAntialiasingEnable(boolean flag) throws VisADException, java.rmi.RemoteExceptionSets the antialiasing flag for the display.- Parameters:
flag- true to enable antialiasing- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- change policy on remote display
-
getSceneAntialiasingEnable
public boolean getSceneAntialiasingEnable()
Get the current antialiasing flag for the display.- Returns:
- true or false
-
setPolygonMode
public void setPolygonMode(int mode) throws VisADException, java.rmi.RemoteExceptionSets the polygon rasterization mode.- Specified by:
setPolygonModein classGraphicsModeControl- Parameters:
mode- the polygon rasterization mode to be used; one of DisplayImplJ3D.POLYGON_FILL, DisplayImplJ3D.POLYGON_LINE, or DisplayImplJ3D.POLYGON_POINT- Throws:
VisADException- bad mode or can't create the necessary VisAD objectjava.rmi.RemoteException- can't change mode on remote display
-
setPolygonMode
public void setPolygonMode(int mode, boolean noChange) throws VisADException, java.rmi.RemoteExceptionSets the polygon rasterization mode. Does not update display- Specified by:
setPolygonModein classGraphicsModeControl- Parameters:
mode- the polygon rasterization mode to be used; one of DisplayImplJ3D.POLYGON_FILL, DisplayImplJ3D.POLYGON_LINE, or DisplayImplJ3D.POLYGON_POINTnoChange- dummy variable- Throws:
VisADException- bad mode or can't create the necessary VisAD objectjava.rmi.RemoteException- can't change mode on remote display
-
getPolygonMode
public int getPolygonMode()
Get the current polygon rasterization mode.- Specified by:
getPolygonModein classGraphicsModeControl- Returns:
- DisplayImplJ3D.POLYGON_FILL, DisplayImplJ3D.POLYGON_LINE, or DisplayImplJ3D.POLYGON_POINT
-
setPolygonOffset
public void setPolygonOffset(float polygonOffset) throws VisADException, java.rmi.RemoteExceptionSets the polygon offset and updates the display.- Specified by:
setPolygonOffsetin classGraphicsModeControl- Parameters:
polygonOffset- the polygon offset to be used- Throws:
VisADException- Unable to change offsetjava.rmi.RemoteException- can't change offset on remote display
-
setPolygonOffset
public void setPolygonOffset(float polygonOffset, boolean noChange)Sets the polygon offset. Does not update the display.- Specified by:
setPolygonOffsetin classGraphicsModeControl- Parameters:
polygonOffset- the polygon offset to be usednoChange- dummy variable- Throws:
VisADException- Unable to change offsetjava.rmi.RemoteException- can't change offset on remote display
-
getPolygonOffset
public float getPolygonOffset()
Get the current polygon offset.- Specified by:
getPolygonOffsetin classGraphicsModeControl- Returns:
- offset
-
setPolygonOffsetFactor
public void setPolygonOffsetFactor(float polygonOffsetFactor) throws VisADException, java.rmi.RemoteExceptionSets the polygon offset factor and updates the display.- Specified by:
setPolygonOffsetFactorin classGraphicsModeControl- Parameters:
polygonOffsetFactor- the polygon offset factor to be used- Throws:
VisADException- Unable to change offset factorjava.rmi.RemoteException- can't change offset factor on remote display
-
setPolygonOffsetFactor
public void setPolygonOffsetFactor(float polygonOffsetFactor, boolean noChange)Sets the polygon offset factor, does not update display.- Specified by:
setPolygonOffsetFactorin classGraphicsModeControl- Parameters:
polygonOffsetFactor- the polygon offset to be usednoChange- dummy variable- Throws:
VisADException- Unable to change offset factorjava.rmi.RemoteException- can't change offset factor on remote display
-
getPolygonOffsetFactor
public float getPolygonOffsetFactor()
Get the current polygon offset factor.- Specified by:
getPolygonOffsetFactorin classGraphicsModeControl- Returns:
- offset factor
-
setDepthBufferEnable
public void setDepthBufferEnable(boolean enable) throws VisADException, java.rmi.RemoteException- Throws:
VisADExceptionjava.rmi.RemoteException
-
setDepthBufferEnable
public void setDepthBufferEnable(boolean enable, boolean noChange)
-
getDepthBufferEnable
public boolean getDepthBufferEnable()
-
setAutoDepthOffsetEnable
public void setAutoDepthOffsetEnable(boolean enable) throws VisADException, java.rmi.RemoteExceptionAutoDepthOffset: automatically offsets (pushes back) z-buffer depth for flat surfaces with first farthest back and successive separated by a constant increment toward front. Useful for reducing visual artifacts due to z-buffer fighting when flat surfaces are coplanar in display space.- Parameters:
enable-- Throws:
VisADExceptionjava.rmi.RemoteException
-
setAutoDepthOffsetEnable
public void setAutoDepthOffsetEnable(boolean enable, boolean noChange) throws VisADException, java.rmi.RemoteException- Throws:
VisADExceptionjava.rmi.RemoteException
-
getAutoDepthOffsetEnable
public boolean getAutoDepthOffsetEnable()
-
setNumRenderersWithDepthOffset
public void setNumRenderersWithDepthOffset(int numWith, boolean noChange) throws VisADException, java.rmi.RemoteExceptionSet the maximum number of DataRenderers in the autoDepthOffset stack.- Parameters:
numWith- should be > 1noChange-- Throws:
VisADExceptionjava.rmi.RemoteException
-
getNumRenderersWithDepthOffset
public int getNumRenderersWithDepthOffset()
-
setDepthOffsetIncrement
public void setDepthOffsetIncrement(float inc, boolean noChange) throws VisADException, java.rmi.RemoteExceptionSet the depth increment between successive flat surfaces in the autoDepthOffset stack. Should be less than zero (z increases into the screen).- Parameters:
inc-noChange-- Throws:
VisADExceptionjava.rmi.RemoteException
-
getDepthOffsetIncrement
public float getDepthOffsetIncrement()
-
getMissingTransparent
public boolean getMissingTransparent()
See whether missing values are rendered as transparent or not.- Specified by:
getMissingTransparentin classGraphicsModeControl- Returns:
- true if missing values are transparent.
-
setMissingTransparent
public void setMissingTransparent(boolean missing)
Set the transparency of missing values.- Specified by:
setMissingTransparentin classGraphicsModeControl- Parameters:
missing- true if missing values should be rendered transparent.
-
getCurvedSize
public int getCurvedSize()
Get the undersampling factor of surface shape for curved texture maps- Specified by:
getCurvedSizein classGraphicsModeControl- Returns:
- undersampling factor (default 10)
-
setCurvedSize
public void setCurvedSize(int curved_size)
Set the undersampling factor of surface shape for curved texture maps- Specified by:
setCurvedSizein classGraphicsModeControl- Parameters:
curved_size- undersampling factor (default 10)
-
getAdjustProjectionSeam
public boolean getAdjustProjectionSeam()
See whether VisADGeometryArray.adjustLongitude/Seam should be called.- Specified by:
getAdjustProjectionSeamin classGraphicsModeControl- Returns:
- true if adjust methods should be called
-
setAdjustProjectionSeam
public void setAdjustProjectionSeam(boolean adjust) throws VisADException, java.rmi.RemoteExceptionSet whether VisADGeometryArray.adjustLongitude/adjustSeam should be called.- Specified by:
setAdjustProjectionSeamin classGraphicsModeControl- Parameters:
adjust- true if adjust methods should be called- Throws:
VisADException- Unable to change adjust seam propertyjava.rmi.RemoteException- can't change adjust seam property on remote display
-
setTexture3DMode
public void setTexture3DMode(int mode) throws VisADException, java.rmi.RemoteExceptionSet the mode for Texture3D for volume rendering- Specified by:
setTexture3DModein classGraphicsModeControl- Parameters:
mode- mode for Texture3D (STACK2D or TEXTURE3D)- Throws:
VisADException- Unable to change Texture3D modejava.rmi.RemoteException- can't change Texture3D mode on remote display
-
getTexture3DMode
public int getTexture3DMode()
Get the mode for Texture3D for volume rendering- Specified by:
getTexture3DModein classGraphicsModeControl- Returns:
- mode for Texture3D (e.g., STACK2D or TEXTURE3D)
-
setCacheAppearances
public void setCacheAppearances(boolean cache)
Set whether the Appearances are reused- Specified by:
setCacheAppearancesin classGraphicsModeControl- Parameters:
cache- true to cache and reuse appearances- Throws:
VisADException- Unable to change cachingjava.rmi.RemoteException- can't change caching on remote display
-
getCacheAppearances
public boolean getCacheAppearances()
Get whether Appearances are cached or not- Specified by:
getCacheAppearancesin classGraphicsModeControl- Returns:
- true if caching
-
setMergeGeometries
public void setMergeGeometries(boolean merge)
Set whether Geometries for shapes should be merged into Group if possible to reduce memory use.- Specified by:
setMergeGeometriesin classGraphicsModeControl- Parameters:
merge- true to merge geometries if possible- Throws:
VisADException- Unable to change cachingjava.rmi.RemoteException- can't change caching on remote display
-
getMergeGeometries
public boolean getMergeGeometries()
Set whether Geometries for shapes should be merged into Group- Specified by:
getMergeGeometriesin classGraphicsModeControl- Returns:
- true if merging is used
-
clone
public java.lang.Object clone()
clone this GraphicsModeControlJ3D- Specified by:
clonein classGraphicsModeControl- Returns:
- a copy of this object
-
syncControl
public void syncControl(Control rmt) throws VisADException
Copy the state of a remote control to this control- Specified by:
syncControlin classControl- Parameters:
rmt- remote control to sync with this one- Throws:
VisADException- rmt == null or rmt is not a GraphicsModeControlJ3D or couldn't tell if control was changed.
-
equals
public boolean equals(java.lang.Object o)
Check to see if this GraphicsModeControlJ3D is equal to the object in question.
-
-
DMelt 3.0 © DataMelt by jWork.ORG