Interface InvertibleProjection

  • All Superinterfaces:
    Projection
    All Known Implementing Classes:
    FlatProjection, LatLonProjection, PolarProjection

    public interface InvertibleProjection
    extends Projection
    A complement interface Projection which provides the inverse transform for invertible projections. Not all projections are required to implement InvertibleProjection, but those that do may work with additional painters.

    For example, CursorTextPainter uses InvertibleProjection to determine the data displayed at the current mouse location.
    Author:
    ulman
    • Method Detail

      • getTextureFractionX

        double getTextureFractionX​(double vertexX,
                                   double vertexY)
        Given a position in physical units, return the corresponding location within a rectangular array of data. The corresponding location is returned in relative coordinates, with 0.0 indicating the 0th data index and 1.0 indicating the last data index.

        This method returns the first (row) index of the data at (vertexX, vertexY).

        Parameters:
        vertexX - a x coordinate in physical space
        vertexY - a y coordinate in physical space
        Returns:
        a relative index (from 0.0 to 1.0) into the data array
      • getTextureFractionY

        double getTextureFractionY​(double vertexX,
                                   double vertexY)
        Parameters:
        vertexX - a x coordinate in physical space
        vertexY - a y coordinate in physical space
        Returns:
        the relative y index (from 0.0 to 1.0) into the data array
        See Also:
        getTextureFractionX( double, double )