visad
Interface MouseBehavior
-
- All Known Implementing Classes:
- MouseBehaviorJ2D, MouseBehaviorJ3D, WandBehaviorJ3D
public interface MouseBehaviorMouseBehavior is the VisAD interface for mouse behaviors for Java3D and Java2D
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description VisADRaycursorRay(double[] cursor)Return the VisAD ray corresponding to the VisAD cursor coordinates.VisADRayfindRay(int screen_x, int screen_y)Return the VisAD ray corresponding to the component coordinates.MouseHelpergetMouseHelper()Get the helper class used by this MouseBehavior.int[]getScreenCoords(double[] position)Return the screen coordinates corresponding to the VisAD coordinates.voidinstance_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.
-
-
-
Method Detail
-
getMouseHelper
MouseHelper getMouseHelper()
Get the helper class used by this MouseBehavior. TheMouseHelperdefines the actions taken based onMouseEvents.- Returns:
MouseHelperbeing used.
-
cursorRay
VisADRay cursorRay(double[] cursor)
Return the VisAD ray corresponding to the VisAD cursor coordinates.- Parameters:
cursor- array (x,y,z) of cursor location- Returns:
- corresponding VisADRay
- See Also:
VisADRay,DisplayRenderer.getCursor()
-
findRay
VisADRay findRay(int screen_x, int screen_y)
Return the VisAD ray corresponding to the component coordinates.- Parameters:
screen_x- x coordinate of the componentscreen_y- y coordinate of the component- Returns:
- corresponding VisADRay
- See Also:
VisADRay,LocalDisplay.getComponent()
-
getScreenCoords
int[] getScreenCoords(double[] position)
Return the screen coordinates corresponding to the VisAD coordinates.- Parameters:
position- array of VisAD coordinates- Returns:
- corresponding (x, y) screen coordinates
-
multiply_matrix
double[] multiply_matrix(double[] a, double[] b)Multiply the two matrices together.- Parameters:
a- first matrixb- second matrix- Returns:
- new resulting matrix
-
make_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.- Parameters:
rotx- x rotationroty- y rotationrotz- z rotationscale- scaling factortransx- x translationtransy- y translationtransz- z translation- Returns:
- new matrix
-
make_matrix
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.- Parameters:
rotx- x rotationroty- y rotationrotz- z rotationscalex- x scaling factorscaley- y scaling factorscalez- z scaling factortransx- x translationtransy- y translationtransz- z translation- Returns:
- new matrix
-
instance_unmake_matrix
void instance_unmake_matrix(double[] rot, double[] scale, double[] trans, double[] matrix)Get the rotation, scale and translation parameters for the specified matrix. Results are not valid for non-uniform aspect (scale).- Parameters:
rot- array to hold x,y,z rotation valuesscale- array to hold scale value(s). If length == 1, assumes uniform scaling.trans- array to hold x,y,z translation values
-
make_translate
double[] make_translate(double transx, double transy)Create a translation matrix. no translation in Z direction (useful for 2D)- Parameters:
transx- x translation amounttransy- y translation amount- Returns:
- new translation matrix. This can be used to translate the current matrix
- See Also:
multiply_matrix(double[] a, double[] b)
-
make_translate
double[] make_translate(double transx, double transy, double transz)Create a translation matrix.- Parameters:
transx- x translation amounttransy- y translation amounttransz- z translation amount- Returns:
- new translation matrix. This can be used to translate the current matrix
- See Also:
multiply_matrix(double[] a, double[] b)
-
-
DMelt 3.0 © DataMelt by jWork.ORG