|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metsci.glimpse.support.projection.PolarProjection
public class PolarProjection
A projection which maps a texture into a circle or annulus (or an angular wedge of the above).
Constructor Summary | |
---|---|
PolarProjection(double minRange,
double maxRange,
double startTheta,
double endTheta)
|
|
PolarProjection(double minRange,
double maxRange,
double startTheta,
double endTheta,
boolean rangeIsX)
|
|
PolarProjection(double centerX,
double centerY,
double minRange,
double maxRange,
double startTheta,
double endTheta)
|
|
PolarProjection(double centerX,
double centerY,
double minRange,
double maxRange,
double startTheta,
double endTheta,
boolean rangeIsX)
|
Method Summary | |
---|---|
double |
diffTheta(double startTheta,
double endTheta)
|
double |
getCenterX()
|
double |
getCenterY()
|
double |
getEndTheta()
|
double |
getMaxRange()
|
double |
getMinRange()
|
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)
|
double |
getStartTheta()
|
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)
|
void |
getVertexXY(double textureFractionX,
double textureFractionY,
float[] resultXY)
Given a position in a rectangular array of data (the texture), return the corresponding location in physical units. |
void |
getVertexXYZ(double textureFractionX,
double textureFractionY,
float[] resultXYZ)
Given a position in a rectangular array of data (the texture), return the corresponding location in physical units. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolarProjection(double centerX, double centerY, double minRange, double maxRange, double startTheta, double endTheta, boolean rangeIsX)
public PolarProjection(double centerX, double centerY, double minRange, double maxRange, double startTheta, double endTheta)
public PolarProjection(double minRange, double maxRange, double startTheta, double endTheta, boolean rangeIsX)
public PolarProjection(double minRange, double maxRange, double startTheta, double endTheta)
Method Detail |
---|
public double diffTheta(double startTheta, double endTheta)
public double getMinRange()
public double getMaxRange()
public double getStartTheta()
public double getEndTheta()
public double getCenterX()
public double getCenterY()
public void getVertexXY(double textureFractionX, double textureFractionY, float[] resultXY)
Projection
This method computes the physical coordinate of the data at (textureFractionX, textureFractionY), and stores them in the resultXY output parameter.
getVertexXY
in interface Projection
textureFractionX
- a relative x index (from 0.0 to 1.0) into the data arraytextureFractionY
- a relative y index (from 0.0 to 1.0) into the data arrayresultXY
- output parameter to be populated with physical coords of the datapublic void getVertexXYZ(double textureFractionX, double textureFractionY, float[] resultXYZ)
Projection
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.
getVertexXYZ
in interface Projection
textureFractionX
- a relative x index (from 0.0 to 1.0) into the data arraytextureFractionY
- a relative y index (from 0.0 to 1.0) into the data arrayresultXYZ
- output parameter to be populated with physical coords of the datapublic int getSizeX(int textureSizeX)
Projection
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).
getSizeX
in interface Projection
textureSizeX
- the length of the data array (the texture) in the x direction
public int getSizeY(int textureSizeY)
getSizeY
in interface Projection
textureSizeY
- the length of the data array (the texture) in the y direction
Projection.getSizeX( int )
public double getTextureFractionX(double vertexX, double vertexY)
InvertibleProjection
This method returns the first (row) index of the data at (vertexX, vertexY).
getTextureFractionX
in interface InvertibleProjection
vertexX
- a x coordinate in physical spacevertexY
- a y coordinate in physical space
public double getTextureFractionY(double vertexX, double vertexY)
getTextureFractionY
in interface InvertibleProjection
vertexX
- a x coordinate in physical spacevertexY
- a y coordinate in physical space
InvertibleProjection.getTextureFractionX( double, double )
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |