visad.java3d
Class ProjectionControlJ3D
- java.lang.Object
-
- visad.Control
-
- visad.ProjectionControl
-
- visad.java3d.ProjectionControlJ3D
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class ProjectionControlJ3D extends ProjectionControl
ProjectionControlJ3D is the VisAD class for controlling the Projection from 3-D to 2-D. It manipulates a TransformGroup node in the scene graph.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intX_MINUSView of the negative X face of the display cubestatic intX_PLUSView of the postive X face of the display cubestatic intY_MINUSView of the negative Y face of the display cubestatic intY_PLUSView of the postive Y face of the display cubestatic intZ_MINUSView of the negative Z face of the display cubestatic intZ_PLUSView of the postive Z face of the display cube-
Fields inherited from class visad.ProjectionControl
INVSCALE2D, MATRIX2D_LENGTH, MATRIX2D_MAJOR, MATRIX2D_MINOR, MATRIX3D_LENGTH, MATRIX3D_MAJOR, MATRIX3D_MINOR, SCALE2D
-
-
Constructor Summary
Constructors Constructor and Description ProjectionControlJ3D(DisplayImpl d)Construct a new ProjectionControl for the display.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddPair(javax.media.j3d.Switch sw, DataRenderer re)voidclearSwitches(DataRenderer re)clear all 'pairs' in switches that involve revoidsetAspect(double[] aspect)Set the aspect for the axes.voidsetMatrix(double[] m)Set the projection matrix.voidsetOrthoView(int view)Set the projection so the requested view is displayed.-
Methods inherited from class visad.ProjectionControl
clone, equals, getAspectCartesian, getMatrix, getSavedProjectionMatrix, getSaveString, matrix2DTo3D, matrix3DTo2D, matrixDConvert, resetProjection, saveProjection, setAspectCartesian, setSaveString, syncControl, toString
-
Methods inherited from class visad.Control
addControlListener, animation_string, changeControl, checkTicks, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, nullControl, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks
-
-
-
-
Field Detail
-
X_PLUS
public static final int X_PLUS
View of the postive X face of the display cube- See Also:
- Constant Field Values
-
X_MINUS
public static final int X_MINUS
View of the negative X face of the display cube- See Also:
- Constant Field Values
-
Y_PLUS
public static final int Y_PLUS
View of the postive Y face of the display cube- See Also:
- Constant Field Values
-
Y_MINUS
public static final int Y_MINUS
View of the negative Y face of the display cube- See Also:
- Constant Field Values
-
Z_PLUS
public static final int Z_PLUS
View of the postive Z face of the display cube- See Also:
- Constant Field Values
-
Z_MINUS
public static final int Z_MINUS
View of the negative Z face of the display cube- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProjectionControlJ3D
public ProjectionControlJ3D(DisplayImpl d) throws VisADException
Construct a new ProjectionControl for the display. The initial projection is saved so it can be reset with resetProjection().- Parameters:
d- display whose projection will be controlled by this- Throws:
VisADException- See Also:
ProjectionControl.resetProjection().
-
-
Method Detail
-
setMatrix
public void setMatrix(double[] m) throws VisADException, java.rmi.RemoteExceptionSet the projection matrix.- Overrides:
setMatrixin classProjectionControl- Parameters:
m- new projection matrix- Throws:
VisADException- VisAD errorjava.rmi.RemoteException- remote error
-
setAspect
public void setAspect(double[] aspect) throws VisADException, java.rmi.RemoteExceptionSet the aspect for the axes. Default upon initialization is 1.0, 1.0, 1.0. Invokes saveProjection to set this as the new default.- Specified by:
setAspectin classProjectionControl- Parameters:
aspect- ratios (dimension 3) for the X, Y, and Z axes- Throws:
VisADException- aspect is null or wrong dimension or other errorjava.rmi.RemoteException- remote error- See Also:
ProjectionControl.saveProjection()
-
addPair
public void addPair(javax.media.j3d.Switch sw, DataRenderer re)
-
clearSwitches
public void clearSwitches(DataRenderer re)
clear all 'pairs' in switches that involve re- Overrides:
clearSwitchesin classProjectionControl
-
setOrthoView
public void setOrthoView(int view) throws VisADException, java.rmi.RemoteExceptionSet the projection so the requested view is displayed.- Parameters:
view- one of the static view fields (X_PLUS, X_MINUS, etc). This will set the view so the selected face is orthogonal to the display.- Throws:
VisADException- VisAD failure.java.rmi.RemoteException- Java RMI failure.
-
-
DMelt 3.0 © DataMelt by jWork.ORG