Documentation of 'visad.MouseBehavior' Java class
MouseBehavior
visad

Interface MouseBehavior

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      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.
    • Method Detail

      • getMouseHelper

        MouseHelper getMouseHelper()
        Get the helper class used by this MouseBehavior. The MouseHelper defines the actions taken based on MouseEvents.
        Returns:
        MouseHelper being 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 component
        screen_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 matrix
        b - 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 rotation
        roty - y rotation
        rotz - z rotation
        scale - scaling factor
        transx - x translation
        transy - y translation
        transz - 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 rotation
        roty - y rotation
        rotz - z rotation
        scalex - x scaling factor
        scaley - y scaling factor
        scalez - z scaling factor
        transx - x translation
        transy - y translation
        transz - 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 values
        scale - 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 amount
        transy - 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 amount
        transy - y translation amount
        transz - 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

You see the box below because you did not login.