visad.bom
Class CurveManipulationRendererJ3D
- java.lang.Object
-
- visad.DataRenderer
-
- visad.java3d.RendererJ3D
-
- visad.java3d.DirectManipulationRendererJ3D
-
- visad.bom.CurveManipulationRendererJ3D
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class CurveManipulationRendererJ3D extends DirectManipulationRendererJ3D
CurveManipulationRendererJ3D is the VisAD class for direct manipulation rendering of curves under Java2D, where curves are represented by UnionSets of Gridded2DSets with manifold dimension = 2
-
-
Constructor Summary
Constructors Constructor and Description CurveManipulationRendererJ3D()Construct a DataRenderer that supports direct manipulation of representations of curves by UnionSets of Gridded2DSets with manifold dimension = 2; the Set's domain RealTypes must be mapped to two of (XAxis, YAxis, ZAxis).CurveManipulationRendererJ3D(int mmm, int mmv)Construct a DataRenderer that supports direct manipulation of representations of curves by UnionSets of Gridded2DSets with manifold dimension = 2; the Set's domain RealTypes must be mapped to two of (XAxis, YAxis, ZAxis).CurveManipulationRendererJ3D(int mmm, int mmv, boolean oo)Construct a DataRenderer that supports direct manipulation of representations of curves by UnionSets of Gridded2DSets with manifold dimension = 2; the Set's domain RealTypes must be mapped to two of (XAxis, YAxis, ZAxis).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddPoint(float[] x)Add a point to the data.floatcheckClose(double[] origin, double[] direction)Find minimum distance from ray to spatialValues.voidcheckDirect()Check whether direct manipulation is possible for this Renderer.java.lang.Objectclone()Clone this renderer.voiddrag_direct(VisADRay ray, boolean first, int mouseModifiers)This method is called when direct manipulation is occuring.java.lang.StringgetWhyNotDirect()Get the error messages on why direct manipulation is not possible.static voidmain(java.lang.String[] args)test CurveManipulationRendererJ3DShadowTypemakeShadowSetType(SetType type, DataDisplayLink link, ShadowType parent)Create a ShadowType based on the SetTypevoidrelease_direct()Mouse button released, ending direct manipulation.voidsetGreedy(boolean greedy)voidsetSpatialValues(float[][] spatial_values)Set spatialValues from ShadowType.doTransform.voidstop_direct()Stop direct manipulation.-
Methods inherited from class visad.java3d.DirectManipulationRendererJ3D
clearScene, doTransform, isLegalTextureMap, setBranch, setLinks
-
Methods inherited from class visad.java3d.RendererJ3D
clearBranch, doAction, flush, getBranch, makeShadowFunctionType, makeShadowRealTupleType, makeShadowRealType, 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, 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
-
CurveManipulationRendererJ3D
public CurveManipulationRendererJ3D()
Construct a DataRenderer that supports direct manipulation of representations of curves by UnionSets of Gridded2DSets with manifold dimension = 2; the Set's domain RealTypes must be mapped to two of (XAxis, YAxis, ZAxis).
-
CurveManipulationRendererJ3D
public CurveManipulationRendererJ3D(int mmm, int mmv)Construct a DataRenderer that supports direct manipulation of representations of curves by UnionSets of Gridded2DSets with manifold dimension = 2; the Set's domain RealTypes must be mapped to two of (XAxis, YAxis, ZAxis). 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)- Parameters:
mmm- mouse modifiersmmv- mouse mask to check.
-
CurveManipulationRendererJ3D
public CurveManipulationRendererJ3D(int mmm, int mmv, boolean oo)Construct a DataRenderer that supports direct manipulation of representations of curves by UnionSets of Gridded2DSets with manifold dimension = 2; the Set's domain RealTypes must be mapped to two of (XAxis, YAxis, ZAxis). 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)- Parameters:
mmm- mouse modifiersmmv- mouse mask to check.oo- if true, only one curve should exist at any one time.
-
-
Method Detail
-
makeShadowSetType
public ShadowType makeShadowSetType(SetType type, DataDisplayLink link, ShadowType parent) throws VisADException, java.rmi.RemoteException
Create a ShadowType based on the SetType- Overrides:
makeShadowSetTypein classRendererJ3D- Parameters:
type- SetType of UnionSet.link- DataDisplayLink for DataReferenceparent- Parent ShadowType- Returns:
- constructed ShadowType
- Throws:
VisADException- problem creating a VisAD objectjava.rmi.RemoteException- problem creating a remote object
-
checkDirect
public void checkDirect() throws VisADException, java.rmi.RemoteExceptionCheck whether direct manipulation is possible for this Renderer. Set appropriate error conditions if not possible.- Overrides:
checkDirectin classDirectManipulationRendererJ3D- Throws:
VisADException- problem accessing informationjava.rmi.RemoteException- problem accessing information for remote objects
-
getWhyNotDirect
public java.lang.String getWhyNotDirect()
Get the error messages on why direct manipulation is not possible.- Overrides:
getWhyNotDirectin classDataRenderer- Returns:
- error messages.
-
addPoint
public void addPoint(float[] x) throws VisADExceptionAdd a point to the data. Not used, but may be needed for performance.- Overrides:
addPointin classDirectManipulationRendererJ3D- Parameters:
x- point to add.- Throws:
VisADException- error occured.
-
setSpatialValues
public void setSpatialValues(float[][] spatial_values)
Set spatialValues from ShadowType.doTransform.- Overrides:
setSpatialValuesin classDataRenderer- Parameters:
spatial_values- spatial values.
-
checkClose
public float checkClose(double[] origin, double[] direction)Find minimum distance from ray to spatialValues.- Overrides:
checkClosein classDataRenderer- Parameters:
origin- origin of raydirection- direction of the ray- Returns:
- miniumum distance from ray to spatial values
-
setGreedy
public void setGreedy(boolean greedy)
-
release_direct
public void release_direct()
Mouse button released, ending direct manipulation. Does nothing now, may need to do this for performance.- Overrides:
release_directin classDataRenderer
-
stop_direct
public void stop_direct()
Stop direct manipulation.- Overrides:
stop_directin classDataRenderer
-
drag_direct
public void drag_direct(VisADRay ray, boolean first, int mouseModifiers)
This method is called when direct manipulation is occuring. This adds points to the Gridded2DSet that comprises the current line being drawn.- Overrides:
drag_directin classDataRenderer- Parameters:
ray- ray to dragging point of mousefirst- true if this is the first point.mouseModifiers- modifiers used with mouse click.
-
clone
public java.lang.Object clone()
Clone this renderer.- Overrides:
clonein classDirectManipulationRendererJ3D- Returns:
- new Renderer with same parameters.
-
main
public static void main(java.lang.String[] args) throws VisADException, java.rmi.RemoteExceptiontest CurveManipulationRendererJ3D- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
DMelt 3.0 © DataMelt by jWork.ORG