visad.bom
Class BarbManipulationRendererJ2D
- java.lang.Object
-
- visad.DataRenderer
-
- visad.java2d.RendererJ2D
-
- visad.java2d.DirectManipulationRendererJ2D
-
- visad.bom.BarbManipulationRendererJ2D
-
- All Implemented Interfaces:
- java.lang.Cloneable, BarbRenderer
public class BarbManipulationRendererJ2D extends DirectManipulationRendererJ2D implements BarbRenderer
BarbManipulationRendererJ2D is the VisAD class for direct manipulation rendering of wind barbs under Java2D
-
-
Constructor Summary
Constructors Constructor and Description BarbManipulationRendererJ2D()this DataRenderer supports direct manipulation for Tuple representations of wind barbs; two of the Tuple's Real components must be mapped to Flow1X and Flow1Y, or Flow2X and Flow2Y
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddPoint(float[] x)add point for temporary rendering; intended to be over-ridden by graphics-API-specific extensions of DataRendererfloatcheckClose(double[] origin, double[] direction)find minimum distance from ray to barb tailvoidcheckDirect()set isDirectManipulation = true if this DataRenderer supports direct manipulation for the MathType of its linked Data, and for its ScalarMaps; intended to be over-ridden by extensions of DataRendererjava.lang.Objectclone()voiddrag_direct(VisADRay ray, boolean first, int mouseModifiers)modify Data values based on direct manipulation mouse actionsbooleangetKnotsConvert()java.lang.StringgetWhyNotDirect()static voidmain(java.lang.String[] args)test BarbManipulationRendererJ2DShadowTypemakeShadowFunctionType(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;ShadowTypemakeShadowRealTupleType(RealTupleType type, DataDisplayLink link, ShadowType parent)factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealTupleType; 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;ShadowTypemakeShadowRealType(RealType type, DataDisplayLink link, ShadowType parent)factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealType; 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;ShadowTypemakeShadowSetType(SetType type, DataDisplayLink link, ShadowType parent)factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowSetType; 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;ShadowTypemakeShadowTupleType(TupleType type, DataDisplayLink link, ShadowType parent)factory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowTupleType; 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;float[]makeVector(boolean south, float x, float y, float z, float scale, float pt_size, float f0, float f1, float[] vx, float[] vy, float[] vz, int[] numv, float[] tx, float[] ty, float[] tz, int[] numt)dummy for BarbRenderervoidrelease_direct()mouse button released, ending direct manipulationvoidsetKnotsConvert(boolean enable)voidsetSpatialValues(float[][] spatial_values)set spatialValues from ShadowType.doTransformvoidsetVectorSpatialValues(float[] mbarb, int which)voidstop_direct()discontinue manipulating Data values for current mouse drag; (this only applies to the current mouse drag and is not a general disable)-
Methods inherited from class visad.java2d.DirectManipulationRendererJ2D
doTransform, getExtraBranch, isLegalTextureMap, setLinks
-
Methods inherited from class visad.java2d.RendererJ2D
clearBranch, clearScene, doAction, makeShadowTextType, toggle
-
Methods inherited from class visad.DataRenderer
addException, checkAction, clearAVControls, clearExceptions, computeRanges, constrainDragPoint, 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, getLink, getLinks, getPickCrawlToCursor, getPolygonOffset, getPolygonOffsetFactor, getProjectionControlListeners, getRanges, getRealVectorTypes, hasPolygonOffset, isTransformControl, prepareAction, realCheckDirect, removeLink, set_all_feasible, setDisplay, setDisplayRenderer, setEarthSpatialData, setEarthSpatialDisplay, setHasPolygonOffset, setIsDirectManipulation, setLastMouseModifiers, setLatLonIndices, setLinks, setPickCrawlToCursor, setPolygonOffset, setPolygonOffsetFactor, spatialToEarth, spatialToEarth, suppressExceptions
-
-
-
-
Constructor Detail
-
BarbManipulationRendererJ2D
public BarbManipulationRendererJ2D()
this DataRenderer supports direct manipulation for Tuple representations of wind barbs; two of the Tuple's Real components must be mapped to Flow1X and Flow1Y, or Flow2X and Flow2Y
-
-
Method Detail
-
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 classRendererJ2D- 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
-
makeShadowRealTupleType
public ShadowType makeShadowRealTupleType(RealTupleType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
Description copied from class:DataRendererfactory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealTupleType; 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:
makeShadowRealTupleTypein classRendererJ2D- 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
-
makeShadowRealType
public ShadowType makeShadowRealType(RealType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
Description copied from class:DataRendererfactory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowRealType; 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:
makeShadowRealTypein classRendererJ2D- 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
-
makeShadowSetType
public ShadowType makeShadowSetType(SetType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
Description copied from class:DataRendererfactory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowSetType; 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:
makeShadowSetTypein classRendererJ2D- 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
-
makeShadowTupleType
public ShadowType makeShadowTupleType(TupleType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
Description copied from class:DataRendererfactory for constructing a subclass of ShadowType appropriate for the graphics API, that also adapts ShadowTupleType; 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:
makeShadowTupleTypein classRendererJ2D- 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
-
makeVector
public float[] makeVector(boolean south, float x, float y, float z, float scale, float pt_size, float f0, float f1, float[] vx, float[] vy, float[] vz, int[] numv, float[] tx, float[] ty, float[] tz, int[] numt)dummy for BarbRenderer- Specified by:
makeVectorin interfaceBarbRenderer
-
setKnotsConvert
public void setKnotsConvert(boolean enable)
- Specified by:
setKnotsConvertin interfaceBarbRenderer
-
getKnotsConvert
public boolean getKnotsConvert()
- Specified by:
getKnotsConvertin interfaceBarbRenderer
-
getWhyNotDirect
public java.lang.String getWhyNotDirect()
- Overrides:
getWhyNotDirectin classDataRenderer- Returns:
- String with reason MathType and ScalarMaps do not qualify for direct manipulation
-
checkDirect
public void checkDirect() throws VisADException, java.rmi.RemoteExceptionDescription copied from class:DataRendererset isDirectManipulation = true if this DataRenderer supports direct manipulation for the MathType of its linked Data, and for its ScalarMaps; intended to be over-ridden by extensions of DataRenderer- Overrides:
checkDirectin classDirectManipulationRendererJ2D- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
addPoint
public void addPoint(float[] x) throws VisADExceptionDescription copied from class:DataRendereradd point for temporary rendering; intended to be over-ridden by graphics-API-specific extensions of DataRenderer- Overrides:
addPointin classDirectManipulationRendererJ2D- Parameters:
x- 3-D graphics coordinates of point to render- Throws:
VisADException- a VisAD error occurred
-
setVectorSpatialValues
public void setVectorSpatialValues(float[] mbarb, int which)
-
setSpatialValues
public void setSpatialValues(float[][] spatial_values)
set spatialValues from ShadowType.doTransform- Overrides:
setSpatialValuesin classDataRenderer- Parameters:
spatial_values- float[3][number_of_points] of 3-D locations of depiction points
-
checkClose
public float checkClose(double[] origin, double[] direction)find minimum distance from ray to barb tail- Overrides:
checkClosein classDataRenderer- Parameters:
origin- 3-D origin of raydirection- 3-D direction of ray- Returns:
- minimum distance of ray to any point in spatialValues (spatial values for Data depiction)
-
release_direct
public void release_direct()
mouse button released, ending direct manipulation- Overrides:
release_directin classDataRenderer
-
stop_direct
public void stop_direct()
Description copied from class:DataRendererdiscontinue manipulating Data values for current mouse drag; (this only applies to the current mouse drag and is not a general disable)- Overrides:
stop_directin classDataRenderer
-
drag_direct
public void drag_direct(VisADRay ray, boolean first, int mouseModifiers)
Description copied from class:DataRenderermodify Data values based on direct manipulation mouse actions- Overrides:
drag_directin classDataRenderer- Parameters:
ray- 3-D graphics coordinates of ray corresponding to mouse screen locationfirst- flag if this is first call (for MouseEvent.MOUSE_PRESSED, not for MouseEvent.MOUSE_DRAGGED)mouseModifiers- value of InputEvent.getModifiers() from most recent direct manipulation mouse click
-
clone
public java.lang.Object clone()
- Overrides:
clonein classDirectManipulationRendererJ2D- Returns:
- a copy of this DataRenderer
-
main
public static void main(java.lang.String[] args) throws VisADException, java.rmi.RemoteExceptiontest BarbManipulationRendererJ2D- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
DMelt 3.0 © DataMelt by jWork.ORG