public interface Projection
Modifier and Type | Method and Description |
---|---|
int |
getSizeX(int textureSizeX)
Returns the number of quads in the x direction that the array of data (the texture)
should be broken into.
|
int |
getSizeY(int textureSizeY) |
void |
getVertexXY(double dataFractionX,
double dataFractionY,
float[] resultXY)
Given a position in a rectangular array of data (the texture), return the
corresponding location in physical units.
|
void |
getVertexXYZ(double dataFractionX,
double dataFractionY,
float[] resultXYZ)
Given a position in a rectangular array of data (the texture), return the
corresponding location in physical units.
|
void getVertexXY(double dataFractionX, double dataFractionY, float[] resultXY)
This method computes the physical coordinate of the data at (textureFractionX, textureFractionY), and stores them in the resultXY output parameter.
dataFractionX
- a relative x index (from 0.0 to 1.0) into the data arraydataFractionY
- a relative y index (from 0.0 to 1.0) into the data arrayresultXY
- output parameter to be populated with physical coords of the datavoid getVertexXYZ(double dataFractionX, double dataFractionY, float[] resultXYZ)
This method computes the physical coordinate of the data at (textureFractionX, textureFractionY), and stores them in the resultXYZ output parameter.
Assigning z coordinates to vertices can be useful even for 2D graphics. For example, it can be used together with z-clipping to avoid rendering some facets.
dataFractionX
- a relative x index (from 0.0 to 1.0) into the data arraydataFractionY
- a relative y index (from 0.0 to 1.0) into the data arrayresultXYZ
- output parameter to be populated with physical coords of the dataint getSizeX(int textureSizeX)
For more complicated projections, the value returned essentially defines the granularity or resolution of the projection (since the projection will ultimately be approximated when displayed by drawing a set of small quads).
textureSizeX
- the length of the data array (the texture) in the x directionint getSizeY(int textureSizeY)
textureSizeY
- the length of the data array (the texture) in the y directiongetSizeX( int )
Copyright © 2016 Metron, Inc.. All rights reserved.