Interface InvertibleProjection
-
- All Superinterfaces:
Projection
- All Known Implementing Classes:
FlatProjection,LatLonProjection,PolarProjection
public interface InvertibleProjection extends Projection
A complement interfaceProjectionwhich 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,CursorTextPainterusesInvertibleProjectionto determine the data displayed at the current mouse location.- Author:
- ulman
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublegetTextureFractionX(double vertexX, double vertexY)Given a position in physical units, return the corresponding location within a rectangular array of data.doublegetTextureFractionY(double vertexX, double vertexY)-
Methods inherited from interface com.metsci.glimpse.core.support.projection.Projection
getSizeX, getSizeY, getVertexXY, getVertexXYZ
-
-
-
-
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 spacevertexY- 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 spacevertexY- 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 )
-
-