visad.java3d
Class ProjectionControlJ3D

java.lang.Object
  extended by visad.Control
      extended by visad.ProjectionControl
          extended by visad.java3d.ProjectionControlJ3D
All Implemented Interfaces:
Serializable, 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
static int X_MINUS
          View of the negative X face of the display cube
static int X_PLUS
          View of the postive X face of the display cube
static int Y_MINUS
          View of the negative Y face of the display cube
static int Y_PLUS
          View of the postive Y face of the display cube
static int Z_MINUS
          View of the negative Z face of the display cube
static int Z_PLUS
          View of the postive Z face of the display cube
 
Fields inherited from class visad.ProjectionControl
INVSCALE2D, matrix, MATRIX2D_LENGTH, MATRIX2D_MAJOR, MATRIX2D_MINOR, MATRIX3D_LENGTH, MATRIX3D_MAJOR, MATRIX3D_MINOR, SCALE2D
 
Constructor Summary
ProjectionControlJ3D(DisplayImpl d)
          Construct a new ProjectionControl for the display.
 
Method Summary
 void addPair(Switch sw, DataRenderer re)
           
 void clearSwitches(DataRenderer re)
          clear all 'pairs' in switches that involve re
 void setAspect(double[] aspect)
          Set the aspect for the axes.
 void setMatrix(double[] m)
          Set the projection matrix.
 void setOrthoView(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
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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,
                      RemoteException
Set the projection matrix.

Overrides:
setMatrix in class ProjectionControl
Parameters:
m - new projection matrix
Throws:
VisADException - VisAD error
RemoteException - remote error

setAspect

public void setAspect(double[] aspect)
               throws VisADException,
                      RemoteException
Set 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:
setAspect in class ProjectionControl
Parameters:
aspect - ratios (dimension 3) for the X, Y, and Z axes
Throws:
VisADException - aspect is null or wrong dimension or other error
RemoteException - remote error
See Also:
ProjectionControl.saveProjection()

addPair

public void addPair(Switch sw,
                    DataRenderer re)

clearSwitches

public void clearSwitches(DataRenderer re)
clear all 'pairs' in switches that involve re

Overrides:
clearSwitches in class ProjectionControl

setOrthoView

public void setOrthoView(int view)
                  throws VisADException,
                         RemoteException
Set 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.
RemoteException - Java RMI failure.