|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.java2d.MouseBehaviorJ2D
public class MouseBehaviorJ2D
MouseBehaviorJ2D is the VisAD class for mouse behaviors for Java2D
Constructor Summary | |
---|---|
MouseBehaviorJ2D(DisplayRendererJ2D r)
Construct a MouseBehavior for the DisplayRenderer specified |
|
MouseBehaviorJ2D(DisplayRendererJ2D r,
Class mhClass)
Construct a MouseBehavior for the DisplayRenderer specified |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MouseBehaviorJ2D(DisplayRendererJ2D r)
r
- DisplayRenderer to usepublic MouseBehaviorJ2D(DisplayRendererJ2D r, Class mhClass)
r
- DisplayRenderer to usemhClass
- MouseHelper subclass to useMethod Detail |
---|
public 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 component
VisADRay
,
LocalDisplay.getComponent()
public VisADRay cursorRay(double[] cursor)
cursorRay
in interface MouseBehavior
cursor
- array (x,y) of cursor location
VisADRay
,
DisplayRenderer.getCursor()
public int[] getScreenCoords(double[] position)
getScreenCoords
in interface MouseBehavior
position
- array of VisAD coordinates
public double[] make_translate(double transx, double transy, double transz)
make_translate
in interface MouseBehavior
transx
- x translation amounttransy
- y translation amounttransz
- z translation amount
multiply_matrix(double[] a, double[] b)
public double[] make_translate(double transx, double transy)
make_translate
in interface MouseBehavior
transx
- x translation amounttransy
- y translation amount
multiply_matrix(double[] a, double[] b)
public double[] multiply_matrix(double[] a, double[] b)
multiply_matrix
in interface MouseBehavior
a
- first matrixb
- second matrix
public 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 translation
public 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 translation
public 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 values
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |