public class MouseBehaviorJ2D extends Object implements MouseBehavior
Constructor and Description |
---|
MouseBehaviorJ2D(DisplayRendererJ2D r)
Construct a MouseBehavior for the DisplayRenderer specified
|
MouseBehaviorJ2D(DisplayRendererJ2D r,
Class mhClass)
Construct a MouseBehavior for the DisplayRenderer specified
|
Modifier and Type | Method and Description |
---|---|
VisADRay |
cursorRay(double[] cursor)
Return the VisAD ray corresponding to the VisAD cursor coordinates.
|
VisADRay |
findRay(int screen_x,
int screen_y)
Return the VisAD ray corresponding to the component coordinates.
|
MouseHelper |
getMouseHelper()
Get the helper class used by this MouseBehavior.
|
int[] |
getScreenCoords(double[] position)
Return the screen coordinates corresponding to the VisAD coordinates.
|
void |
instance_unmake_matrix(double[] rot,
double[] scale,
double[] trans,
double[] matrix)
Get the rotation, scale and translation parameters for the specified
matrix.
|
double[] |
make_matrix(double rotx,
double roty,
double rotz,
double scale,
double transx,
double transy,
double transz)
Make a transformation matrix to perform the given rotation, scale and
translation.
|
double[] |
make_matrix(double rotx,
double roty,
double rotz,
double scalex,
double scaley,
double scalez,
double transx,
double transy,
double transz)
Make a transformation matrix to perform the given rotation, scale and
translation.
|
double[] |
make_translate(double transx,
double transy)
Create a translation matrix.
|
double[] |
make_translate(double transx,
double transy,
double transz)
Create a translation matrix.
|
double[] |
multiply_matrix(double[] a,
double[] b)
Multiply the two matrices together.
|
public MouseBehaviorJ2D(DisplayRendererJ2D r)
r
- DisplayRenderer to usepublic MouseBehaviorJ2D(DisplayRendererJ2D r, Class mhClass)
r
- DisplayRenderer to usemhClass
- MouseHelper subclass to usepublic MouseHelper getMouseHelper()
MouseHelper
defines the actions taken based
on MouseEvent
s.getMouseHelper
in interface MouseBehavior
MouseHelper
being used.public VisADRay findRay(int screen_x, int screen_y)
findRay
in interface MouseBehavior
screen_x
- x coordinate of the componentscreen_y
- y coordinate of the componentVisADRay
,
LocalDisplay.getComponent()
public VisADRay cursorRay(double[] cursor)
cursorRay
in interface MouseBehavior
cursor
- array (x,y) of cursor locationVisADRay
,
DisplayRenderer.getCursor()
public int[] getScreenCoords(double[] position)
getScreenCoords
in interface MouseBehavior
position
- array of VisAD coordinatespublic double[] make_translate(double transx, double transy, double transz)
make_translate
in interface MouseBehavior
transx
- x translation amounttransy
- y translation amounttransz
- z translation amountmultiply_matrix(double[] a, double[] b)
public double[] make_translate(double transx, double transy)
make_translate
in interface MouseBehavior
transx
- x translation amounttransy
- y translation amountmultiply_matrix(double[] a, double[] b)
public double[] multiply_matrix(double[] a, double[] b)
multiply_matrix
in interface MouseBehavior
a
- first matrixb
- second matrixpublic double[] make_matrix(double rotx, double roty, double rotz, double scale, double transx, double transy, double transz)
make_matrix
in interface MouseBehavior
rotx
- x rotationroty
- y rotationrotz
- z rotationscale
- scaling factortransx
- x translationtransy
- y translationtransz
- z translationpublic double[] make_matrix(double rotx, double roty, double rotz, double scalex, double scaley, double scalez, double transx, double transy, double transz)
make_matrix
in interface MouseBehavior
rotx
- x rotationroty
- y rotationrotz
- z rotationscalex
- x scaling factorscaley
- y scaling factorscalez
- z scaling factortransx
- x translationtransy
- y translationtransz
- z translationpublic void instance_unmake_matrix(double[] rot, double[] scale, double[] trans, double[] matrix)
instance_unmake_matrix
in interface MouseBehavior
rot
- array to hold x,y,z rotation valuesscale
- array to hold scale valuetrans
- array to hold x,y,z translation valuesCopyright © 1996–2023 The SSEC Visualization Project. All rights reserved.