Documentation of 'visad.util.CursorUtil' Java class
CursorUtil
visad.util

Class CursorUtil



  • public class CursorUtil
    extends java.lang.Object
    Utility methods for cursor-related functions, including converting between pixel, cursor and domain coordinates, and evaluating functions at a given cursor location.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CursorUtil() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double[] cursorToDomain(DisplayImpl d, double[] cursor)
      Converts the given cursor coordinates to domain coordinates.
      static double[] cursorToDomain(DisplayImpl d, RealType[] types, double[] cursor)
      Converts the given cursor coordinates to domain coordinates.
      static int[] cursorToPixel(DisplayImpl d, double[] cursor)
      Converts the given cursor coordinates to pixel coordinates.
      static double[] domainToCursor(DisplayImpl d, double[] domain)
      Converts the given domain coordinates to cursor coordinates.
      static double[] domainToCursor(DisplayImpl d, RealType[] types, double[] domain)
      Converts the given domain coordinates to cursor coordinates.
      static int[] domainToPixel(DisplayImpl d, double[] domain)
      Converts the given domain coordinates to pixel coordinates.
      static double[] evaluate(FunctionImpl data, double[] domain)
      Evaluates the given function at the specified domain coordinates.
      static double[][] getScaleValues(DisplayImpl d, RealType[] types)
      Gets scale values (multiplier and offset) for the X, Y and Z maps corresponding to the given RealTypes (or the first ScalarMaps to X, Y and Z if types is null).
      static ScalarMap[] getXYZMaps(DisplayImpl d, RealType[] types)
      Gets X, Y and Z maps for the given display, corresponding to the specified RealTypes, or the first ScalarMaps to X, Y and Z if types is null.
      static double[] pixelToCursor(DisplayImpl d, int x, int y)
      Converts the given pixel coordinates to cursor coordinates.
      static double[] pixelToDomain(DisplayImpl d, int x, int y)
      Converts the given pixel coordinates to domain coordinates.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CursorUtil

        public CursorUtil()
    • Method Detail

      • cursorToDomain

        public static double[] cursorToDomain(DisplayImpl d,
                                              RealType[] types,
                                              double[] cursor)
        Converts the given cursor coordinates to domain coordinates.
      • domainToCursor

        public static double[] domainToCursor(DisplayImpl d,
                                              RealType[] types,
                                              double[] domain)
        Converts the given domain coordinates to cursor coordinates.
      • cursorToDomain

        public static double[] cursorToDomain(DisplayImpl d,
                                              double[] cursor)
        Converts the given cursor coordinates to domain coordinates.
      • domainToCursor

        public static double[] domainToCursor(DisplayImpl d,
                                              double[] domain)
        Converts the given domain coordinates to cursor coordinates.
      • pixelToCursor

        public static double[] pixelToCursor(DisplayImpl d,
                                             int x,
                                             int y)
        Converts the given pixel coordinates to cursor coordinates.
      • cursorToPixel

        public static int[] cursorToPixel(DisplayImpl d,
                                          double[] cursor)
        Converts the given cursor coordinates to pixel coordinates.
      • pixelToDomain

        public static double[] pixelToDomain(DisplayImpl d,
                                             int x,
                                             int y)
        Converts the given pixel coordinates to domain coordinates.
      • domainToPixel

        public static int[] domainToPixel(DisplayImpl d,
                                          double[] domain)
        Converts the given domain coordinates to pixel coordinates.
      • evaluate

        public static double[] evaluate(FunctionImpl data,
                                        double[] domain)
                                 throws VisADException,
                                        java.rmi.RemoteException
        Evaluates the given function at the specified domain coordinates.
        Throws:
        VisADException
        java.rmi.RemoteException
      • getScaleValues

        public static double[][] getScaleValues(DisplayImpl d,
                                                RealType[] types)
        Gets scale values (multiplier and offset) for the X, Y and Z maps corresponding to the given RealTypes (or the first ScalarMaps to X, Y and Z if types is null). If no mapping to a spatial axis is found, that component of the array will be null.
        Returns:
        Scale array of size [3][2], with the first dimension corresponding to X, Y or Z, and the second giving multiplier and offset. For example, cursor_x = scale[0][0] * domain_x + scale[0][1].
      • getXYZMaps

        public static ScalarMap[] getXYZMaps(DisplayImpl d,
                                             RealType[] types)
        Gets X, Y and Z maps for the given display, corresponding to the specified RealTypes, or the first ScalarMaps to X, Y and Z if types is null.
        Returns:
        RealType array of size [3], for X, Y and Z map, respectively.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.