edu.wisc.ssec.mcidasv.data.hydra
Class MyRubberBandBoxRendererJ3D

java.lang.Object
  extended by visad.DataRenderer
      extended by visad.java3d.RendererJ3D
          extended by visad.java3d.DirectManipulationRendererJ3D
              extended by edu.wisc.ssec.mcidasv.data.hydra.MyRubberBandBoxRendererJ3D
All Implemented Interfaces:
Cloneable

public class MyRubberBandBoxRendererJ3D
extends DirectManipulationRendererJ3D

RubberBandBoxRendererJ3D is the VisAD class for direct manipulation of rubber band boxes


Field Summary
 boolean active
           
private  byte blue
           
private  BranchGroup branch
           
private  float[][] clast_x
           
private  float cum_lon
           
private  float[] d
           
(package private)  float[] default_values
           
private  int directManifoldDimension
          dimension of direct manipulation (always 2 for RubberBandBoxRendererJ3D)
private static int EDGE
           
 boolean enabled
           
private static float EPS
           
private  float[] f
          arrays of length one for inverseScaleValues
private  float[][] first_x
           
private  byte green
           
private  BranchGroup group
           
private  boolean keep_last_box
           
private  Appearance last_appearance
           
 Gridded3DSet last_box
           
private  GeometryArray last_geometry
           
private  BranchGroup last_group
           
private  float[][] last_x
           
private  DataDisplayLink link
          for use in drag_direct
private  int mouseModifiersMask
           
private  int mouseModifiersValue
           
private  int otherindex
           
private  float othervalue
           
private  byte red
           
private  DataReference ref
           
private  boolean stop
           
private  DisplayTupleType tuple
          spatial DisplayTupleType other than DisplaySpatialCartesianTuple
private  CoordinateSystem tuplecs
           
private  float[] value
           
private  String whyNotDirect
          explanation for invalid use of DirectManipulationRenderer
private  RealType x
           
private static String xandyNotMatch
          possible values for whyNotDirect
private static String xandyNotSpatial
           
private  int xindex
           
private  ScalarMap xmap
           
private  RealTupleType xy
           
private  RealType y
           
private  int yindex
           
private  ScalarMap ymap
           
 
Fields inherited from class visad.DataRenderer
pickCrawlToCursor
 
Constructor Summary
MyRubberBandBoxRendererJ3D(RealType xarg, RealType yarg)
          this DirectManipulationRenderer is quite different - it does not render its data, but only place values into its DataReference on right mouse button release; it uses xarg and yarg to determine spatial ScalarMaps
MyRubberBandBoxRendererJ3D(RealType xarg, RealType yarg, int mmm, int mmv)
          xarg and yarg determine spatial ScalarMaps; mmm and mmv determine whehter SHIFT or CTRL keys are required - this is needed since this is a greedy DirectManipulationRenderer that will grab any right mouse click (that intersects its 2-D sub-manifold)
 
Method Summary
 void addPoint(float[] x)
           
 float checkClose(double[] origin, double[] direction)
          check if ray intersects sub-manifold
 void checkDirect()
           
 Object clone()
           
 BranchGroup doTransform()
          don't render - just return BranchGroup for scene graph to render rectangle into
 void drag_direct(VisADRay ray, boolean first, int mouseModifiers)
           
private  int getDirectManifoldDimension()
           
 CoordinateSystem getDisplayCoordinateSystem()
           
 BranchGroup getLastBox()
           
 String getWhyNotDirect()
           
 void release_direct()
          mouse button released, ending direct manipulation
 void removeLastBox()
           
 void setKeepLastBoxOn(boolean keep)
           
 void setLastBox(BranchGroup box_bg)
           
 void setLastBox(MyRubberBandBoxRendererJ3D rbbr)
           
 void setSpatialValues(float[][] spatial_values)
          set spatialValues from ShadowType.doTransform
 void stop_direct()
           
 
Methods inherited from class visad.java3d.DirectManipulationRendererJ3D
clearScene, isLegalTextureMap, setBranch, setLinks
 
Methods inherited from class visad.java3d.RendererJ3D
clearBranch, doAction, flush, getBranch, makeShadowFunctionType, makeShadowRealTupleType, makeShadowRealType, makeShadowSetType, makeShadowTextType, makeShadowTupleType, 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, 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
 

Field Detail

x

private RealType x

y

private RealType y

xy

private RealTupleType xy

mouseModifiersMask

private int mouseModifiersMask

mouseModifiersValue

private int mouseModifiersValue

branch

private BranchGroup branch

group

private BranchGroup group

keep_last_box

private boolean keep_last_box

last_group

private BranchGroup last_group

last_geometry

private GeometryArray last_geometry

last_appearance

private Appearance last_appearance

last_box

public Gridded3DSet last_box

enabled

public boolean enabled

active

public boolean active

link

private transient DataDisplayLink link
for use in drag_direct


ref

private transient DataReference ref

xmap

private transient ScalarMap xmap

ymap

private transient ScalarMap ymap

default_values

float[] default_values

f

private float[] f
arrays of length one for inverseScaleValues


d

private float[] d

value

private float[] value

whyNotDirect

private String whyNotDirect
explanation for invalid use of DirectManipulationRenderer


directManifoldDimension

private int directManifoldDimension
dimension of direct manipulation (always 2 for RubberBandBoxRendererJ3D)


tuple

private DisplayTupleType tuple
spatial DisplayTupleType other than DisplaySpatialCartesianTuple


tuplecs

private CoordinateSystem tuplecs

xindex

private int xindex

yindex

private int yindex

otherindex

private int otherindex

othervalue

private float othervalue

red

private byte red

green

private byte green

blue

private byte blue

first_x

private float[][] first_x

last_x

private float[][] last_x

clast_x

private float[][] clast_x

cum_lon

private float cum_lon

xandyNotMatch

private static final String xandyNotMatch
possible values for whyNotDirect

See Also:
Constant Field Values

xandyNotSpatial

private static final String xandyNotSpatial
See Also:
Constant Field Values

stop

private boolean stop

EDGE

private static final int EDGE
See Also:
Constant Field Values

EPS

private static final float EPS
See Also:
Constant Field Values
Constructor Detail

MyRubberBandBoxRendererJ3D

public MyRubberBandBoxRendererJ3D(RealType xarg,
                                  RealType yarg)
this DirectManipulationRenderer is quite different - it does not render its data, but only place values into its DataReference on right mouse button release; it uses xarg and yarg to determine spatial ScalarMaps


MyRubberBandBoxRendererJ3D

public MyRubberBandBoxRendererJ3D(RealType xarg,
                                  RealType yarg,
                                  int mmm,
                                  int mmv)
xarg and yarg determine spatial ScalarMaps; mmm and mmv determine whehter SHIFT or CTRL keys are required - this is needed since this is a greedy DirectManipulationRenderer that will grab any right mouse click (that intersects its 2-D sub-manifold)

Method Detail

doTransform

public BranchGroup doTransform()
                        throws VisADException,
                               RemoteException
don't render - just return BranchGroup for scene graph to render rectangle into

Overrides:
doTransform in class DirectManipulationRendererJ3D
Throws:
VisADException
RemoteException

checkDirect

public void checkDirect()
                 throws VisADException,
                        RemoteException
Overrides:
checkDirect in class DirectManipulationRendererJ3D
Throws:
VisADException
RemoteException

getDirectManifoldDimension

private int getDirectManifoldDimension()

getWhyNotDirect

public String getWhyNotDirect()
Overrides:
getWhyNotDirect in class DataRenderer

addPoint

public void addPoint(float[] x)
              throws VisADException
Overrides:
addPoint in class DirectManipulationRendererJ3D
Throws:
VisADException

getDisplayCoordinateSystem

public CoordinateSystem getDisplayCoordinateSystem()
Overrides:
getDisplayCoordinateSystem in class DataRenderer

setSpatialValues

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

Overrides:
setSpatialValues in class DataRenderer

checkClose

public float checkClose(double[] origin,
                        double[] direction)
check if ray intersects sub-manifold

Overrides:
checkClose in class DataRenderer

release_direct

public void release_direct()
mouse button released, ending direct manipulation

Overrides:
release_direct in class DataRenderer

stop_direct

public void stop_direct()
Overrides:
stop_direct in class DataRenderer

drag_direct

public void drag_direct(VisADRay ray,
                        boolean first,
                        int mouseModifiers)
Overrides:
drag_direct in class DataRenderer

clone

public Object clone()
Overrides:
clone in class DirectManipulationRendererJ3D

setKeepLastBoxOn

public void setKeepLastBoxOn(boolean keep)

removeLastBox

public void removeLastBox()

getLastBox

public BranchGroup getLastBox()

setLastBox

public void setLastBox(BranchGroup box_bg)

setLastBox

public void setLastBox(MyRubberBandBoxRendererJ3D rbbr)