|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvisad.Control
visad.ProjectionControl
public abstract class ProjectionControl
ProjectionControl is the VisAD interface for controlling the Projection from 3-D to 2-D.
| Field Summary | |
|---|---|
static double |
INVSCALE2D
Inverse of SCALE2D |
protected double[] |
matrix
matrix[] shouldn't be used by non-ProjectionControl classes |
static int |
MATRIX2D_LENGTH
Length of a 2D matrix |
static int |
MATRIX2D_MAJOR
Major dimension of the 2D matrix |
static int |
MATRIX2D_MINOR
Minor dimension of the 2D matrix |
static int |
MATRIX3D_LENGTH
Length of a 2D matrix |
static int |
MATRIX3D_MAJOR
Major dimension of the 3D matrix |
static int |
MATRIX3D_MINOR
Minor dimension of the 3D matrix |
static double |
SCALE2D
Default scaling factor for 2D matrix |
| Constructor Summary | |
|---|---|
ProjectionControl(DisplayImpl d)
Construct a ProjectionControl for the display in question. |
|
| Method Summary | |
|---|---|
void |
clearSwitches(DataRenderer re)
clear all 'pairs' in switches that involve re |
Object |
clone()
Create a clone of this ProjectionControl. |
boolean |
equals(Object o)
Check to see if the object in question is equal to this ProjectionControl. |
double[] |
getAspectCartesian()
|
double[] |
getMatrix()
Returns a copy of the graphics projection matrix. |
double[] |
getSavedProjectionMatrix()
Get the matrix that defines the saved graphics projection |
String |
getSaveString()
Get a string that can be used to reconstruct this control later |
static double[] |
matrix2DTo3D(double[] matrix)
Convert a 2D matrix to a 3D matrix, retaining the scale and aspect of the 2D matrix. |
static double[] |
matrix3DTo2D(double[] matrix)
Convert a 3D matrix to a 2D matrix, retaining the scale and aspect of the 3D matrix. |
static double[] |
matrixDConvert(double[] matrix)
Convert a 3D matrix to a 2D matrix or vice-versa, retaining the scale and aspect of the original matrix. |
void |
resetProjection()
Restores to projection matrix at time of last saveProjection()
call -- if one was made -- or to initial projection otherwise. |
void |
saveProjection()
Saves the current display projection matrix. |
abstract void |
setAspect(double[] aspect)
Set aspect ratio of axes |
void |
setAspectCartesian(double[] aspect)
Set aspect ratio of axes, in ScalarMaps rather than matrix |
void |
setMatrix(double[] m)
Set the matrix that defines the graphics projection |
void |
setSaveString(String save)
Set the properties of this control using the specified save string |
void |
syncControl(Control rmt)
Copy the state of a remote control to this control |
String |
toString()
A string representation of this ProjectionControl. |
| 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 |
|---|
protected double[] matrix
public static final int MATRIX2D_LENGTH
public static final int MATRIX2D_MAJOR
public static final int MATRIX2D_MINOR
public static final int MATRIX3D_LENGTH
public static final int MATRIX3D_MAJOR
public static final int MATRIX3D_MINOR
public static final double SCALE2D
public static final double INVSCALE2D
| Constructor Detail |
|---|
public ProjectionControl(DisplayImpl d)
throws VisADException
d - display to control
VisADException - d already has a ProjectionControl or some other
VisAD Error| Method Detail |
|---|
public double[] getMatrix()
public void setMatrix(double[] m)
throws VisADException,
RemoteException
m - array of the matrix values (16 elements in Java3D case,
6 elements in Java2D case)
VisADException - invalid matrix length
RemoteException - Java RMI failure.public String getSaveString()
getSaveString in class Control
public void setSaveString(String save)
throws VisADException,
RemoteException
setSaveString in class Controlsave - String to use for setting the properties.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public abstract void setAspect(double[] aspect)
throws VisADException,
RemoteException
aspect - ratios; 3 elements for Java3D, 2 for Java2D
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public void setAspectCartesian(double[] aspect)
throws VisADException,
RemoteException
aspect - ratios; 3 elements for Java3D, 2 for Java2D
VisADException - VisAD failure.
RemoteException - Java RMI failure.public double[] getAspectCartesian()
public void saveProjection()
resetProjection().
resetProjection()public double[] getSavedProjectionMatrix()
public void resetProjection()
throws VisADException,
RemoteException
saveProjection()
call -- if one was made -- or to initial projection otherwise.
VisADException - VisAD failure.
RemoteException - Java RMI failure.saveProjection()
public static double[] matrix2DTo3D(double[] matrix)
throws VisADException
matrix - 2D matrix to convert
VisADException - wrong length for matrix (not MATRIX2D_LENGTH)
public static double[] matrix3DTo2D(double[] matrix)
throws VisADException
matrix - 3D matrix to convert
VisADException - wrong length for matrix (not MATRIX3D_LENGTH)
public static double[] matrixDConvert(double[] matrix)
throws VisADException
matrix3DTo2D or matrix2DTo3D.
matrix - matrix to convert
VisADException - wrong length for matrix (not MATRIX3D_LENGTH)matrix3DTo2D(double[]),
matrix2DTo3D(double[])public void clearSwitches(DataRenderer re)
public void syncControl(Control rmt)
throws VisADException
syncControl in class Controlrmt - remote control
VisADException - rmt is null or not a ProjectionControl or
some other VisAD errorpublic boolean equals(Object o)
equals in class Controlo - object in question.
public Object clone()
clone in class Controlpublic String toString()
toString in class Control
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||