visad.bom
Class SwellManipulationRendererJ3D

java.lang.Object
  extended by visad.DataRenderer
      extended by visad.java3d.RendererJ3D
          extended by visad.java3d.DirectManipulationRendererJ3D
              extended by visad.bom.BarbManipulationRendererJ3D
                  extended by visad.bom.SwellManipulationRendererJ3D
All Implemented Interfaces:
Cloneable, BarbRenderer

public class SwellManipulationRendererJ3D
extends BarbManipulationRendererJ3D

SwellManipulationRendererJ3D is the VisAD class for direct manipulation rendering of swells under Java3D


Field Summary
 
Fields inherited from class visad.DataRenderer
enabled, pickCrawlToCursor
 
Constructor Summary
SwellManipulationRendererJ3D()
          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
 void addPoint(float[] x)
          add point for temporary rendering; intended to be over-ridden by graphics-API-specific extensions of DataRenderer
 float checkClose(double[] origin, double[] direction)
          find minimum distance from ray to barb tail
 void checkDirect()
          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 DataRenderer
 Object clone()
           
 void drag_direct(VisADRay ray, boolean first, int mouseModifiers)
          modify Data values based on direct manipulation mouse actions
 String getWhyNotDirect()
           
static void main(String[] args)
          test SwellManipulationRendererJ3D
 ShadowType makeShadowFunctionType(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;
 ShadowType makeShadowRealTupleType(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;
 ShadowType makeShadowRealType(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;
 ShadowType makeShadowSetType(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;
 ShadowType makeShadowTupleType(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)
          draw swell, f0 and f1 in meters
 void release_direct()
          mouse button released, ending direct manipulation
 void setSpatialValues(float[][] spatial_values)
          set spatialValues from ShadowType.doTransform
 void setVectorSpatialValues(float[] mbarb, int which)
           
 
Methods inherited from class visad.bom.BarbManipulationRendererJ3D
getKnotsConvert, getNoNumbers, getNumDecPlaces, setKnotsConvert, setNoNumbers, setNumDecPlaces, stop_direct
 
Methods inherited from class visad.java3d.DirectManipulationRendererJ3D
clearScene, doTransform, isLegalTextureMap, setBranch, setLinks
 
Methods inherited from class visad.java3d.RendererJ3D
clearBranch, doAction, flush, getBranch, makeShadowTextType, setBranchEarly, 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, getRanges, getRealVectorTypes, isTransformControl, prepareAction, realCheckDirect, removeLink, set_all_feasible, setDisplay, setDisplayRenderer, setEarthSpatialData, setEarthSpatialDisplay, setIsDirectManipulation, setLastMouseModifiers, setLatLonIndices, setLinks, setPickCrawlToCursor, spatialToEarth, spatialToEarth, suppressExceptions
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwellManipulationRendererJ3D

public SwellManipulationRendererJ3D()
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

makeShadowRealTupleType

public ShadowType makeShadowRealTupleType(RealTupleType type,
                                          DataDisplayLink link,
                                          ShadowType parent)
                                   throws VisADException,
                                          RemoteException
Description copied from class: DataRenderer
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;

Overrides:
makeShadowRealTupleType in class BarbManipulationRendererJ3D
Parameters:
type - FunctionType that returned ShadowType will shadow
link - DataDisplayLink linking Data to be depicted
parent - parent in ShadowType tree structure
Returns:
constructed ShadowType
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

makeShadowTupleType

public ShadowType makeShadowTupleType(TupleType type,
                                      DataDisplayLink link,
                                      ShadowType parent)
                               throws VisADException,
                                      RemoteException
Description copied from class: DataRenderer
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;

Overrides:
makeShadowTupleType in class BarbManipulationRendererJ3D
Parameters:
type - FunctionType that returned ShadowType will shadow
link - DataDisplayLink linking Data to be depicted
parent - parent in ShadowType tree structure
Returns:
constructed ShadowType
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

makeShadowFunctionType

public ShadowType makeShadowFunctionType(FunctionType type,
                                         DataDisplayLink link,
                                         ShadowType parent)
                                  throws VisADException,
                                         RemoteException
Description copied from class: DataRenderer
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;

Overrides:
makeShadowFunctionType in class BarbManipulationRendererJ3D
Parameters:
type - FunctionType that returned ShadowType will shadow
link - DataDisplayLink linking Data to be depicted
parent - parent in ShadowType tree structure
Returns:
constructed ShadowType
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

makeShadowRealType

public ShadowType makeShadowRealType(RealType type,
                                     DataDisplayLink link,
                                     ShadowType parent)
                              throws VisADException,
                                     RemoteException
Description copied from class: DataRenderer
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;

Overrides:
makeShadowRealType in class BarbManipulationRendererJ3D
Parameters:
type - FunctionType that returned ShadowType will shadow
link - DataDisplayLink linking Data to be depicted
parent - parent in ShadowType tree structure
Returns:
constructed ShadowType
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

makeShadowSetType

public ShadowType makeShadowSetType(SetType type,
                                    DataDisplayLink link,
                                    ShadowType parent)
                             throws VisADException,
                                    RemoteException
Description copied from class: DataRenderer
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;

Overrides:
makeShadowSetType in class BarbManipulationRendererJ3D
Parameters:
type - FunctionType that returned ShadowType will shadow
link - DataDisplayLink linking Data to be depicted
parent - parent in ShadowType tree structure
Returns:
constructed ShadowType
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

getWhyNotDirect

public String getWhyNotDirect()
Overrides:
getWhyNotDirect in class BarbManipulationRendererJ3D
Returns:
String with reason MathType and ScalarMaps do not qualify for direct manipulation

checkDirect

public void checkDirect()
                 throws VisADException,
                        RemoteException
Description copied from class: DataRenderer
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 DataRenderer

Overrides:
checkDirect in class BarbManipulationRendererJ3D
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

addPoint

public void addPoint(float[] x)
              throws VisADException
Description copied from class: DataRenderer
add point for temporary rendering; intended to be over-ridden by graphics-API-specific extensions of DataRenderer

Overrides:
addPoint in class BarbManipulationRendererJ3D
Parameters:
x - 3-D graphics coordinates of point to render
Throws:
VisADException - a VisAD error occurred

setVectorSpatialValues

public void setVectorSpatialValues(float[] mbarb,
                                   int which)
Overrides:
setVectorSpatialValues in class BarbManipulationRendererJ3D

setSpatialValues

public void setSpatialValues(float[][] spatial_values)
set spatialValues from ShadowType.doTransform

Overrides:
setSpatialValues in class BarbManipulationRendererJ3D
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:
checkClose in class BarbManipulationRendererJ3D
Parameters:
origin - 3-D origin of ray
direction - 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_direct in class BarbManipulationRendererJ3D

drag_direct

public void drag_direct(VisADRay ray,
                        boolean first,
                        int mouseModifiers)
Description copied from class: DataRenderer
modify Data values based on direct manipulation mouse actions

Overrides:
drag_direct in class BarbManipulationRendererJ3D
Parameters:
ray - 3-D graphics coordinates of ray corresponding to mouse screen location
first - 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

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)
draw swell, f0 and f1 in meters

Specified by:
makeVector in interface BarbRenderer
Overrides:
makeVector in class BarbManipulationRendererJ3D

clone

public Object clone()
Overrides:
clone in class BarbManipulationRendererJ3D
Returns:
a copy of this DataRenderer

main

public static void main(String[] args)
                 throws VisADException,
                        RemoteException
test SwellManipulationRendererJ3D

Throws:
VisADException
RemoteException