com.metsci.glimpse.support.projection
Interface InvertibleProjection

All Known Implementing Classes:
FlatProjection, PolarProjection, TangentPlaneProjection

public interface InvertibleProjection

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 Summary
 double getTextureFractionX(double vertexX, double vertexY)
          Given a position in physical units, return the corresponding location within a rectangular array of data.
 double getTextureFractionY(double vertexX, double vertexY)
           
 

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 )


Copyright © 2012 Metron, Inc.. All Rights Reserved.