visad.bom
Class ImageRendererJ3D
- java.lang.Object
-
- visad.DataRenderer
-
- visad.java3d.RendererJ3D
-
- visad.java3d.DefaultRendererJ3D
-
- visad.bom.ImageRendererJ3D
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class ImageRendererJ3D extends DefaultRendererJ3D
ImageRendererJ3D is the VisAD class for fast loading of images and image sequences under Java3D. WARNING - when reUseFrames is true during doTransform() ImageRendererJ3D makes these assumptions: 1. That the images in a new time sequence are identical to any images at the same time in a previous sequence. 2. That the image sequence defines the entire animation sampling.
-
-
Constructor Summary
Constructors Constructor and Description ImageRendererJ3D()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidclearScene()clear any scene graph created by this DataRenderer, and clear all instance variablesjava.lang.Objectclone()javax.media.j3d.BranchGroupdoTransform()create a BranchGroup scene graph for Data in links[0]VisADImageNodegetImageNode()booleangetLastAdjustProjectionSeam()floatgetLastAlphaValue()intgetLastCurveSize()longgetLastDataHashCode()floatgetLastZAxisValue()booleangetReUseFrames()booleangetSetSetOnReUseFrames()static booleanisByRefUsable(DataDisplayLink link, ShadowType shadow)static booleanisImageType(MathType type)determine whether the given MathType is usable with ImageRendererJ3Dstatic booleanisRendererUsable(MathType type, ScalarMap[] maps)determine whether the given MathType and collection of ScalarMaps meets the criteria to use ImageRendererJ3D.static voidmain(java.lang.String[] args)run 'java visad.bom.ImageRendererJ3D len step' to test animation behavior of ImageRendererJ3D renders a loop of len at step ms per frame then updates loop by deleting first time and adding a new last timeShadowTypemakeShadowFunctionType(FunctionType type, DataDisplayLink link, ShadowType parent)factory method for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowFunctionType; ShadowType trees are constructed that 'shadow' the MathType trees of Data to be depicted, via recursive calls to buildShadowType() methods of MathType sub-classes, to DataRenderer.makeShadow*Type() methods, to Shadow*Type constructors, then back to buildShadowType() methods; the recursive call chain is initiated by DataDisplayLink.prepareData() calls to buildShadowType() methods of MathType sub-classes;voidsetImageNode(VisADImageNode node)voidsetLastAdjustProjectionSeam(boolean adjust)voidsetLastAlphaValue(float alpha)voidsetLastCurveSize(int csize)voidsetLastDataHashCode(long lastdata_hashcode)voidsetLastZAxisValue(float zaxis_value)voidsetReUseFrames()Deprecated.- use setReUseFrames(boolean reuse)voidsetReUseFrames(boolean reuse)Toggle the re-using of frames when a new image or set of images is set in the datareference.voidsetSetSetOnReUseFrames(boolean ss)voidsuggestBufImageType(int imageType)Suggest to the underlying shadow type the buffered image type to use.static voidverifyImageRendererUsable(MathType type, ScalarMap[] maps)Deprecated.Use isRendererUsable(MathType, ScalarMap[]) instead.-
Methods inherited from class visad.java3d.DefaultRendererJ3D
addSwitch, getLink, setLinks
-
Methods inherited from class visad.java3d.RendererJ3D
clearBranch, doAction, flush, getBranch, makeShadowRealTupleType, makeShadowRealType, makeShadowSetType, makeShadowTextType, makeShadowTupleType, setBranchEarly, toggle
-
Methods inherited from class visad.DataRenderer
addException, addPoint, checkAction, checkClose, checkDirect, clearAVControls, clearExceptions, computeRanges, constrainDragPoint, drag_direct, earthToSpatial, earthToSpatial, findRayManifoldIntersection, get_all_feasible, get_any_changed, get_any_transform_control, getBadScale, getDisplay, getDisplayCoordinateSystem, getDisplayRenderer, getEarthDimension, getEarthUnits, getEnabled, getExceptionVector, getIsDirectManipulation, getLastMouseModifiers, getLatLonIndices, getLatLonRange, getLinks, getPickCrawlToCursor, getPolygonOffset, getPolygonOffsetFactor, getProjectionControlListeners, getRanges, getRealVectorTypes, getWhyNotDirect, hasPolygonOffset, isLegalTextureMap, isTransformControl, prepareAction, realCheckDirect, release_direct, removeLink, set_all_feasible, setDisplay, setDisplayRenderer, setEarthSpatialData, setEarthSpatialDisplay, setHasPolygonOffset, setIsDirectManipulation, setLastMouseModifiers, setLatLonIndices, setLinks, setPickCrawlToCursor, setPolygonOffset, setPolygonOffsetFactor, setSpatialValues, spatialToEarth, spatialToEarth, stop_direct, suppressExceptions
-
-
-
-
Method Detail
-
isImageType
public static boolean isImageType(MathType type)
determine whether the given MathType is usable with ImageRendererJ3D
-
verifyImageRendererUsable
public static void verifyImageRendererUsable(MathType type, ScalarMap[] maps) throws VisADException
Deprecated. Use isRendererUsable(MathType, ScalarMap[]) instead.- Throws:
VisADException
-
isRendererUsable
public static boolean isRendererUsable(MathType type, ScalarMap[] maps) throws VisADException
determine whether the given MathType and collection of ScalarMaps meets the criteria to use ImageRendererJ3D. Throw a VisADException if ImageRenderer cannot be used, otherwise return true.- Throws:
VisADException
-
isByRefUsable
public static boolean isByRefUsable(DataDisplayLink link, ShadowType shadow) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
makeShadowFunctionType
public ShadowType makeShadowFunctionType(FunctionType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
Description copied from class:DataRendererfactory method for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowFunctionType; ShadowType trees are constructed that 'shadow' the MathType trees of Data to be depicted, via recursive calls to buildShadowType() methods of MathType sub-classes, to DataRenderer.makeShadow*Type() methods, to Shadow*Type constructors, then back to buildShadowType() methods; the recursive call chain is initiated by DataDisplayLink.prepareData() calls to buildShadowType() methods of MathType sub-classes;- Overrides:
makeShadowFunctionTypein classRendererJ3D- Parameters:
type- FunctionType that returned ShadowType will shadowlink- DataDisplayLink linking Data to be depictedparent- parent in ShadowType tree structure- Returns:
- constructed ShadowType
- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
setReUseFrames
public void setReUseFrames(boolean reuse)
Toggle the re-using of frames when a new image or set of images is set in the datareference.WARNING - when reUseFrames is true during doTransform() ImageRendererJ3D makes these assumptions:
- That the images in a new time sequence are identical to any images at the same time in a previous sequence.
- That the image sequence defines the entire animation
sampling.
-
suggestBufImageType
public void suggestBufImageType(int imageType)
Suggest to the underlying shadow type the buffered image type to use. Experimental: This may changed or removed in future releases.
-
setImageNode
public void setImageNode(VisADImageNode node)
-
getImageNode
public VisADImageNode getImageNode()
-
setReUseFrames
public void setReUseFrames()
Deprecated. - use setReUseFrames(boolean reuse)Turn on the reusing of frames
-
getReUseFrames
public boolean getReUseFrames()
-
setSetSetOnReUseFrames
public void setSetSetOnReUseFrames(boolean ss)
-
getSetSetOnReUseFrames
public boolean getSetSetOnReUseFrames()
-
clearScene
public void clearScene()
Description copied from class:DataRendererclear any scene graph created by this DataRenderer, and clear all instance variables- Overrides:
clearScenein classDefaultRendererJ3D
-
doTransform
public javax.media.j3d.BranchGroup doTransform() throws VisADException, java.rmi.RemoteExceptionDescription copied from class:DefaultRendererJ3Dcreate a BranchGroup scene graph for Data in links[0]- Overrides:
doTransformin classDefaultRendererJ3D- Throws:
VisADExceptionjava.rmi.RemoteException
-
clone
public java.lang.Object clone()
- Overrides:
clonein classDefaultRendererJ3D- Returns:
- a copy of this DataRenderer
-
main
public static void main(java.lang.String[] args) throws VisADException, java.rmi.RemoteException, java.io.IOExceptionrun 'java visad.bom.ImageRendererJ3D len step' to test animation behavior of ImageRendererJ3D renders a loop of len at step ms per frame then updates loop by deleting first time and adding a new last time- Throws:
VisADExceptionjava.rmi.RemoteExceptionjava.io.IOException
-
getLastCurveSize
public int getLastCurveSize()
-
setLastCurveSize
public void setLastCurveSize(int csize)
-
getLastZAxisValue
public float getLastZAxisValue()
-
setLastZAxisValue
public void setLastZAxisValue(float zaxis_value)
-
getLastAlphaValue
public float getLastAlphaValue()
-
setLastAlphaValue
public void setLastAlphaValue(float alpha)
-
getLastDataHashCode
public long getLastDataHashCode()
-
setLastDataHashCode
public void setLastDataHashCode(long lastdata_hashcode)
-
getLastAdjustProjectionSeam
public boolean getLastAdjustProjectionSeam()
-
setLastAdjustProjectionSeam
public void setLastAdjustProjectionSeam(boolean adjust)
-
-
DMelt 3.0 © DataMelt by jWork.ORG