visad.bom
Class PointManipulationRendererJ3D
- java.lang.Object
-
- visad.DataRenderer
-
- visad.java3d.RendererJ3D
-
- visad.java3d.DirectManipulationRendererJ3D
-
- visad.bom.PointManipulationRendererJ3D
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class PointManipulationRendererJ3D extends DirectManipulationRendererJ3D
PointManipulationRendererJ3D is the VisAD class for direct manipulation of single points
-
-
Constructor Summary
Constructors Constructor and Description PointManipulationRendererJ3D(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 press; it uses xarg and yarg to determine spatial ScalarMapsPointManipulationRendererJ3D(RealType xarg, RealType yarg, int mmm, int mmv)xarg and yarg determine spatial ScalarMaps; mmm and mmv determine whether 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
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)check if ray intersects sub-manifoldvoidcheckDirect()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()javax.media.j3d.BranchGroupdoTransform()don't render - just return BranchGroup for scene graph to render rectangle intovoiddrag_direct(VisADRay ray, boolean first, int mouseModifiers)modify Data values based on direct manipulation mouse actionsCoordinateSystemgetDisplayCoordinateSystem()java.lang.StringgetWhyNotDirect()static voidmain(java.lang.String[] args)test PointManipulationRendererJ3DvoidsetSpatialValues(float[][] spatial_values)set spatialValues from ShadowType.doTransformvoidstop_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.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, 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, suppressExceptions
-
-
-
-
Constructor Detail
-
PointManipulationRendererJ3D
public PointManipulationRendererJ3D(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 press; it uses xarg and yarg to determine spatial ScalarMaps
-
PointManipulationRendererJ3D
public PointManipulationRendererJ3D(RealType xarg, RealType yarg, int mmm, int mmv)
xarg and yarg determine spatial ScalarMaps; mmm and mmv determine whether 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 Modifier Mask", matches the modifiers we want plus all that we don't wantmmv- - "Mouse Modifier Value", equals the subset of mask that we want to match
-
-
Method Detail
-
doTransform
public javax.media.j3d.BranchGroup doTransform() throws VisADException, java.rmi.RemoteExceptiondon't render - just return BranchGroup for scene graph to render rectangle into- Overrides:
doTransformin classDirectManipulationRendererJ3D- Throws:
VisADExceptionjava.rmi.RemoteException
-
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 classDirectManipulationRendererJ3D- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
getWhyNotDirect
public java.lang.String getWhyNotDirect()
- Overrides:
getWhyNotDirectin classDataRenderer- Returns:
- String with reason MathType and ScalarMaps do not qualify for direct manipulation
-
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 classDirectManipulationRendererJ3D- Parameters:
x- 3-D graphics coordinates of point to render- Throws:
VisADException- a VisAD error occurred
-
getDisplayCoordinateSystem
public CoordinateSystem getDisplayCoordinateSystem()
- Overrides:
getDisplayCoordinateSystemin classDataRenderer- Returns:
- CoordinateSystem for spatial DisplayTupleType (null if DisplaySpatialCartesianTuple)
-
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)check if ray intersects sub-manifold- Overrides:
checkClosein classDataRenderer- Parameters:
origin- 3-D origin of raydirection- 3-D direction of ray- Returns:
- float, 0 - hit, Float.MAX_VALUE - no hit
-
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 classDirectManipulationRendererJ3D- Returns:
- a copy of this DataRenderer
-
main
public static void main(java.lang.String[] args) throws VisADException, java.rmi.RemoteExceptiontest PointManipulationRendererJ3D- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
DMelt 3.0 © DataMelt by jWork.ORG