public abstract class ProjectionControl extends Control
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
ProjectionControl(DisplayImpl d)
Construct a ProjectionControl for the display in question.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addControlListener, animation_string, changeControl, checkTicks, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, nullControl, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicksprotected 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
public ProjectionControl(DisplayImpl d) throws VisADException
d - display to controlVisADException - d already has a ProjectionControl or some other
VisAD Errorpublic 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 lengthRemoteException - Java RMI failure.public String getSaveString()
getSaveString in class Controlpublic 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 Java2DVisADException - VisAD failure.RemoteException - Java RMI failure.public void setAspectCartesian(double[] aspect)
throws VisADException,
RemoteException
aspect - ratios; 3 elements for Java3D, 2 for Java2DVisADException - 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 convertVisADException - wrong length for matrix (not MATRIX2D_LENGTH)public static double[] matrix3DTo2D(double[] matrix)
throws VisADException
matrix - 3D matrix to convertVisADException - wrong length for matrix (not MATRIX3D_LENGTH)public static double[] matrixDConvert(double[] matrix)
throws VisADException
matrix3DTo2D or matrix2DTo3D.matrix - matrix to convertVisADException - 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 controlVisADException - rmt is null or not a ProjectionControl or
some other VisAD errorpublic boolean equals(Object o)
public Object clone()
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.