visad.bom
Class PickManipulationRendererJ3D
- java.lang.Object
-
- visad.DataRenderer
-
- visad.java3d.RendererJ3D
-
- visad.java3d.DirectManipulationRendererJ3D
-
- visad.bom.PickManipulationRendererJ3D
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class PickManipulationRendererJ3D extends DirectManipulationRendererJ3D
PickManipulationRendererJ3D is the VisAD class for picking data in 3D.
-
-
Constructor Summary
Constructors Constructor and Description PickManipulationRendererJ3D()Default constructorPickManipulationRendererJ3D(int mmm, int mmv)Construct a new PickManipulationRenderer using the mouseModifiers supplied.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddPoint(float[] x)Add a point.floatcheckClose(double[] origin, double[] direction)Check if ray intersects sub-manifold.voidcheckDirect()Check if direct manipulation is possible.java.lang.Objectclone()voiddrag_direct(VisADRay ray, boolean first, int mouseModifiers)Actual workhorse method of manipulation renderer.intgetCloseIndex()Return the index of the closes point.CoordinateSystemgetDisplayCoordinateSystem()Get the CoordinateSystem for the display side.java.lang.StringgetWhyNotDirect()If direct manipulation is not possible, get the error message explaining why.static voidmain(java.lang.String[] args)test PickManipulationRendererJ3DvoidsetSpatialValues(float[][] spatial_values)Set spatialValues from ShadowType.doTransform-
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, 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, getPolygonOffset, getPolygonOffsetFactor, getProjectionControlListeners, getRanges, getRealVectorTypes, hasPolygonOffset, isTransformControl, prepareAction, realCheckDirect, release_direct, removeLink, set_all_feasible, setDisplay, setDisplayRenderer, setEarthSpatialData, setEarthSpatialDisplay, setHasPolygonOffset, setIsDirectManipulation, setLastMouseModifiers, setLatLonIndices, setLinks, setPickCrawlToCursor, setPolygonOffset, setPolygonOffsetFactor, spatialToEarth, spatialToEarth, stop_direct, suppressExceptions
-
-
-
-
Constructor Detail
-
PickManipulationRendererJ3D
public PickManipulationRendererJ3D()
Default constructor
-
PickManipulationRendererJ3D
public PickManipulationRendererJ3D(int mmm, int mmv)Construct a new PickManipulationRenderer using the mouseModifiers supplied. 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 modifiers mask.mmv- mouse modifiers value.
-
-
Method Detail
-
checkDirect
public void checkDirect() throws VisADException, java.rmi.RemoteExceptionCheck if direct manipulation is possible.- Overrides:
checkDirectin classDirectManipulationRendererJ3D- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
getWhyNotDirect
public java.lang.String getWhyNotDirect()
If direct manipulation is not possible, get the error message explaining why.- Overrides:
getWhyNotDirectin classDataRenderer- Returns:
- error message. Will be null if no errors.
-
addPoint
public void addPoint(float[] x) throws VisADExceptionAdd a point. a no-op at this point.- Overrides:
addPointin classDirectManipulationRendererJ3D- Parameters:
x- point value.- Throws:
VisADException- a VisAD error occurred
-
getDisplayCoordinateSystem
public CoordinateSystem getDisplayCoordinateSystem()
Get the CoordinateSystem for the display side.- Overrides:
getDisplayCoordinateSystemin classDataRenderer- Returns:
- null for this DataRenderer
-
setSpatialValues
public void setSpatialValues(float[][] spatial_values)
Set spatialValues from ShadowType.doTransform- Overrides:
setSpatialValuesin classDataRenderer- Parameters:
spatial_values- X, Y, Z values
-
checkClose
public float checkClose(double[] origin, double[] direction)Check if ray intersects sub-manifold.- Overrides:
checkClosein classDataRenderer- Parameters:
origin- x,y,z values of the raydirection- x,y,z values of the ray?- Returns:
- distance from the spatial values.
-
getCloseIndex
public int getCloseIndex()
Return the index of the closes point.- Returns:
- index of closest point
-
drag_direct
public void drag_direct(VisADRay ray, boolean first, int mouseModifiers)
Actual workhorse method of manipulation renderer. It's what gets called when the click is done.- Overrides:
drag_directin classDataRenderer- Parameters:
ray- ray of point where click is.first- if this is the first time.mouseModifiers- modifiers used with the mouse.
-
clone
public java.lang.Object clone()
- Overrides:
clonein classDirectManipulationRendererJ3D- Returns:
- a copy of this DataRenderer
-
main
public static void main(java.lang.String[] args) throws VisADException, java.rmi.RemoteExceptiontest PickManipulationRendererJ3D- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
DMelt 3.0 © DataMelt by jWork.ORG