visad.java3d
Class TransformOnlyDisplayRendererJ3D
- java.lang.Object
-
- visad.DisplayRenderer
-
- visad.java3d.DisplayRendererJ3D
-
- visad.java3d.TransformOnlyDisplayRendererJ3D
-
- All Implemented Interfaces:
- java.util.EventListener, ControlListener, RendererSourceListener
- Direct Known Subclasses:
- NodeDisplayRendererJ3D
public class TransformOnlyDisplayRendererJ3D extends DisplayRendererJ3D
TransformOnlyDisplayRendererJ3Dis the VisAD class for the transforming but not rendering under Java3D.
-
-
Constructor Summary
Constructors Constructor and Description TransformOnlyDisplayRendererJ3D()This is theDisplayRendererused for theTRANSFORM_ONLYapi.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddDirectManipulationSceneGraphComponent(javax.media.j3d.Group group, DirectManipulationRendererJ3D renderer)voidaddSceneGraphComponent(javax.media.j3d.Group group)booleananyDirects()Check to see if there are anyDirectManipulationRenderers in this display.voidclearScales()Remove all the scales being rendered.voidclearScene(DataRenderer renderer)javax.media.j3d.BranchGroupcreateSceneGraph(javax.media.j3d.View v, javax.media.j3d.TransformGroup vpt, VisADCanvasJ3D c)Create scene graph root, if none exists, with Transform and direct manipulation root; create 3-D box, lights andMouseBehaviorJ3Dfor embedded user interface.voiddrag_cursor(VisADRay ray, boolean first)drag cursor parallel to plane of screenvoiddrag_depth(float diff)drag cursor in depth (in and out of screen)voiddrawCursorStringVector(VisADCanvasJ3D canvas)WhenevercursorOnordirectOnis true, display Strings in cursorStringVector.DataRendererfindDirect(VisADRay ray, int mouseModifiers)Find theDataRendererthat is closest to the ray and uses the specified mouse modifiers for direct manipulation.java.awt.image.BufferedImagegetImage()Capture the display rendition as an image.booleanlegalDataRenderer(DataRenderer renderer)Check if theDataRendererin question is legal for thisDisplayRendererDataRenderermakeDefaultRenderer()Create the defaultDataRendererfor this type ofDisplayRenderervoidsetBoxAspect(double[] aspect)set the aspect for the containing box aspect double[3] array used to scale x, y and z box sizesvoidsetCursorLoc(float x, float y, float z)Set the cursor locationvoidsetCursorOn(boolean on)Toggle the cursor in the displayvoidsetDirectOn(boolean on)Set the flag for direct manipulationvoidsetScale(int axis, int axis_ordinal, VisADLineArray array, float[] scale_color)Set the scale for the appropriate axis.voidsetScale(int axis, int axis_ordinal, VisADLineArray array, VisADTriangleArray labels, float[] scale_color)Set the scale for the appropriate axis.voidsetScaleOn(boolean on)Set the scales on.voidsetTransform3D(javax.media.j3d.Transform3D t)-
Methods inherited from class visad.java3d.DisplayRendererJ3D
addKeyboardBehavior, addLockedSceneGraphComponent, addLockedSceneGraphComponent, clearScale, controlChanged, createBasicSceneGraph, createBasicSceneGraph, depth_cursor, destroy, getBoxOnBranch, getCanvas, getCursor, getCursorOnBranch, getKeyboardBehavior, getMouseBehavior, getRoot, getTextureHeightMax, getTextureWidthMax, getTrans, getView, getViewTrans, initControl, makeControl, render_trigger, rendererDeleted, setClip, setDisplay, setLineWidth, setScale, setSceneGraphObjectName, setWaitFlag, updateLockedTrans
-
Methods inherited from class visad.DisplayRenderer
getAnimationString, getAnimationStringVisible, getBoxOn, getCursorColor, getCursorStringVector, getCursorStringVectorUnconditional, getDirectAxisValue, getDirectAxisValue, getDisplay, getMode2D, getPickThreshhold, getRendererControl, getRotateAboutCenter, getScaleRotation, getWaitFlag, getWaitMessageVisible, legalDisplayScalar, prepareAction, setAnimationString, setAnimationStringVisible, setBackgroundColor, setBackgroundColor, setBoxColor, setBoxColor, setBoxOn, setCursorColor, setCursorColor, setCursorStringOn, setCursorStringVector, setCursorStringVector, setForegroundColor, setForegroundColor, setPickThreshhold, setRotateAboutCenter, setScaleRotation, setWaitMessageVisible
-
-
-
-
Constructor Detail
-
TransformOnlyDisplayRendererJ3D
public TransformOnlyDisplayRendererJ3D()
This is theDisplayRendererused for theTRANSFORM_ONLYapi. It is used for only transforming data into VisADSceneGraphObject but not rendering (and hence no interaction).
-
-
Method Detail
-
createSceneGraph
public javax.media.j3d.BranchGroup createSceneGraph(javax.media.j3d.View v, javax.media.j3d.TransformGroup vpt, VisADCanvasJ3D c)Create scene graph root, if none exists, with Transform and direct manipulation root; create 3-D box, lights andMouseBehaviorJ3Dfor embedded user interface.- Specified by:
createSceneGraphin classDisplayRendererJ3D- Parameters:
v-vpt-c-- Returns:
- Scene graph root.
-
getImage
public java.awt.image.BufferedImage getImage()
Description copied from class:DisplayRendererJ3DCapture the display rendition as an image.- Overrides:
getImagein classDisplayRendererJ3D- Returns:
- image of the display.
-
setCursorOn
public void setCursorOn(boolean on)
Description copied from class:DisplayRendererJ3DToggle the cursor in the display- Overrides:
setCursorOnin classDisplayRendererJ3D- Parameters:
on- true to display the cursor, false to hide it.
-
setDirectOn
public void setDirectOn(boolean on)
Description copied from class:DisplayRendererJ3DSet the flag for direct manipulation- Overrides:
setDirectOnin classDisplayRendererJ3D- Parameters:
on- true for enabling direct manipulation, false to disable
-
addSceneGraphComponent
public void addSceneGraphComponent(javax.media.j3d.Group group)
- Overrides:
addSceneGraphComponentin classDisplayRendererJ3D
-
addDirectManipulationSceneGraphComponent
public void addDirectManipulationSceneGraphComponent(javax.media.j3d.Group group, DirectManipulationRendererJ3D renderer)- Overrides:
addDirectManipulationSceneGraphComponentin classDisplayRendererJ3D
-
clearScene
public void clearScene(DataRenderer renderer)
- Overrides:
clearScenein classDisplayRendererJ3D
-
drag_depth
public void drag_depth(float diff)
Description copied from class:DisplayRendererdrag cursor in depth (in and out of screen)- Overrides:
drag_depthin classDisplayRendererJ3D- Parameters:
diff- amount to move cursor in depth (0.0 corresponds to no movement)
-
drag_cursor
public void drag_cursor(VisADRay ray, boolean first)
Description copied from class:DisplayRendererdrag cursor parallel to plane of screen- Overrides:
drag_cursorin classDisplayRendererJ3D- Parameters:
ray- VisADRay that goes through new cursor locationfirst- true to indicate this is first call to drag_cursor() for this drag
-
setCursorLoc
public void setCursorLoc(float x, float y, float z)Description copied from class:DisplayRendererJ3DSet the cursor location- Overrides:
setCursorLocin classDisplayRendererJ3D- Parameters:
x- x locationy- y locationz- z location
-
drawCursorStringVector
public void drawCursorStringVector(VisADCanvasJ3D canvas)
Description copied from class:DisplayRendererJ3DWhenevercursorOnordirectOnis true, display Strings in cursorStringVector.- Overrides:
drawCursorStringVectorin classDisplayRendererJ3D
-
findDirect
public DataRenderer findDirect(VisADRay ray, int mouseModifiers)
Description copied from class:DisplayRendererJ3DFind theDataRendererthat is closest to the ray and uses the specified mouse modifiers for direct manipulation.- Overrides:
findDirectin classDisplayRendererJ3D- Parameters:
ray- position to checkmouseModifiers- modifiers for mouse clicks- Returns:
- closest DataRenderer that uses the specified mouse click modifiers for direct manipulation or null if there is none.
-
anyDirects
public boolean anyDirects()
Description copied from class:DisplayRendererJ3DCheck to see if there are anyDirectManipulationRenderers in this display.- Overrides:
anyDirectsin classDisplayRendererJ3D- Returns:
- true if there are any
-
setScaleOn
public void setScaleOn(boolean on)
Description copied from class:DisplayRendererJ3DSet the scales on.- Overrides:
setScaleOnin classDisplayRendererJ3D- Parameters:
on- turn on if true, otherwise turn them off
-
setScale
public void setScale(int axis, int axis_ordinal, VisADLineArray array, float[] scale_color) throws VisADExceptionDescription copied from class:DisplayRendererJ3DSet the scale for the appropriate axis.- Overrides:
setScalein classDisplayRendererJ3D- Parameters:
axis- axis for this scale (0 = XAxis, 1 = YAxis, 2 = ZAxis)axis_ordinal- position along the axisarray-VisADLineArrayrepresenting the scale plotscale_color- array (dim 3) representing the red, green and blue color values.- Throws:
VisADException- couldn't set the scale
-
setScale
public void setScale(int axis, int axis_ordinal, VisADLineArray array, VisADTriangleArray labels, float[] scale_color) throws VisADExceptionDescription copied from class:DisplayRendererJ3DSet the scale for the appropriate axis.- Overrides:
setScalein classDisplayRendererJ3D- Parameters:
axis- axis for this scale (0 = XAxis, 1 = YAxis, 2 = ZAxis)axis_ordinal- position along the axisarray-VisADLineArrayrepresenting the scale plotlabels-VisADTriangleArrayrepresenting the labels created using a font (can be null)scale_color- array (dim 3) representing the red, green and blue color values.- Throws:
VisADException- couldn't set the scale
-
clearScales
public void clearScales()
Description copied from class:DisplayRendererJ3DRemove all the scales being rendered.- Overrides:
clearScalesin classDisplayRendererJ3D
-
setTransform3D
public void setTransform3D(javax.media.j3d.Transform3D t)
- Overrides:
setTransform3Din classDisplayRendererJ3D
-
setBoxAspect
public void setBoxAspect(double[] aspect)
Description copied from class:DisplayRendererset the aspect for the containing box aspect double[3] array used to scale x, y and z box sizes- Specified by:
setBoxAspectin classDisplayRenderer
-
makeDefaultRenderer
public DataRenderer makeDefaultRenderer()
Description copied from class:DisplayRendererJ3DCreate the defaultDataRendererfor this type ofDisplayRenderer- Overrides:
makeDefaultRendererin classDisplayRendererJ3D- Returns:
- new default renderer
-
legalDataRenderer
public boolean legalDataRenderer(DataRenderer renderer)
Description copied from class:DisplayRendererJ3DCheck if theDataRendererin question is legal for thisDisplayRenderer- Overrides:
legalDataRendererin classDisplayRendererJ3D- Parameters:
renderer-DataRendererto check- Returns:
- true if renderer is a subclass of
RendererJ3D
-
-
DMelt 3.0 © DataMelt by jWork.ORG