Projection
SinProjection
public class SkyviewProjection extends java.lang.Object implements Projection
Modifier and Type | Field | Description |
---|---|---|
static SkyviewProjection |
AIT |
Aitoff projection.
|
static SkyviewProjection |
CAR1 |
Cartesian projection.
|
static SkyviewProjection |
TAN |
Gnomonic projection.
|
Constructor | Description |
---|---|
SkyviewProjection(skyview.geometry.Projecter projecter,
java.awt.Shape shape,
boolean isContinuous) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
SkyAspect |
createAspect(boolean reflect,
double[] r3,
double radiusRad,
Range[] ranges) |
Creates a SkyAspect from configuration information.
|
static SkyviewProjection |
createProjection(skyview.geometry.Projecter projecter,
boolean isContinuous) |
Factory method that knows shapes for some projections.
|
double[] |
cursorRotate(double[] rotmat,
java.awt.geom.Point2D.Double pos0,
java.awt.geom.Point2D.Double pos1) |
Returns null - rotation not implemented.
|
SkyFov |
getFov(SkySurface surf) |
Returns the field of view represented by this aspect.
|
java.lang.String |
getProjectionDescription() |
Returns a short description of the projection.
|
java.lang.String |
getProjectionName() |
Returns the projection name.
|
java.awt.Shape |
getProjectionShape() |
Returns the shape which encloses all the plane positions to which
legal sky coordinates can be projected.
|
skyview.geometry.Projecter |
getSkyviewProjecter() |
Returns the projecter object used by this SkyviewProjection.
|
boolean |
isContinuous() |
Indicates whether this projection is known to be continous over
its whole range.
|
boolean |
project(double rx,
double ry,
double rz,
java.awt.geom.Point2D.Double pos) |
Transforms a sky position to a plane position.
|
double[] |
projRotate(double[] rotmat,
java.awt.geom.Point2D.Double pos0,
java.awt.geom.Point2D.Double pos1) |
Returns null - rotation not implemented.
|
boolean |
unproject(java.awt.geom.Point2D.Double pos,
double[] r3) |
Transforms a plane position to a sky position.
|
boolean |
useRanges(boolean reflect,
double[] r3,
double radiusRad) |
Returns false - ranging not used.
|
public static final SkyviewProjection AIT
public static final SkyviewProjection CAR1
public static final SkyviewProjection TAN
public SkyviewProjection(skyview.geometry.Projecter projecter, java.awt.Shape shape, boolean isContinuous)
!projecter.straddleable()
.projecter
- projecter objectshape
- shape of the sky in this projectionisContinuous
- whether projection is known to be continuouspublic java.lang.String getProjectionName()
Projection
getProjectionName
in interface Projection
public java.lang.String getProjectionDescription()
Projection
getProjectionDescription
in interface Projection
public java.awt.Shape getProjectionShape()
Projection
getProjectionShape
in interface Projection
public boolean isContinuous()
Projection
isContinuous
in interface Projection
public boolean project(double rx, double ry, double rz, java.awt.geom.Point2D.Double pos)
Projection
project
in interface Projection
rx
- normalised 3D X coordinatery
- normalised 3D Y coordinaterz
- normalised 3D Z coordinatepos
- point object into which projected dimensionless X,Y
coordinates will be written on successpublic boolean unproject(java.awt.geom.Point2D.Double pos, double[] r3)
Projection
unproject
in interface Projection
pos
- contains dimensionless X,Y coordinates of plane positionr3
- 3-element array into which normalised X,Y,Z sky coordinates
will be written on successpublic double[] cursorRotate(double[] rotmat, java.awt.geom.Point2D.Double pos0, java.awt.geom.Point2D.Double pos1)
cursorRotate
in interface Projection
rotmat
- initial rotation matrixpos0
- initial cursor positionpos1
- destination cursor positionpublic double[] projRotate(double[] rotmat, java.awt.geom.Point2D.Double pos0, java.awt.geom.Point2D.Double pos1)
projRotate
in interface Projection
rotmat
- initial rotation matrixpos0
- initial projected positionpos1
- destination projected positionpublic boolean useRanges(boolean reflect, double[] r3, double radiusRad)
useRanges
in interface Projection
reflect
- whether requested aspect will be reflectedr3
- central position of field of view (may be null)radiusRad
- radius of field of view (may be NaN)SurfaceFactory.readRanges(P, uk.ac.starlink.ttools.plot2.PlotLayer[], uk.ac.starlink.ttools.plot2.data.DataStore)
public SkyAspect createAspect(boolean reflect, double[] r3, double radiusRad, Range[] ranges)
Projection
createAspect
in interface Projection
reflect
- whether requested aspect will be reflectedr3
- central position of field of view (may be null)radiusRad
- radius of field of view (may be NaN)ranges
- definite ranges for normalised X,Y,Z coordinates
acquired from dataSurfaceFactory.createAspect(P, uk.ac.starlink.ttools.plot2.config.ConfigMap, uk.ac.starlink.ttools.plot.Range[])
public SkyFov getFov(SkySurface surf)
Projection
getFov
in interface Projection
surf
- sky surface, which must be set up using this projectionpublic skyview.geometry.Projecter getSkyviewProjecter()
public static SkyviewProjection createProjection(skyview.geometry.Projecter projecter, boolean isContinuous)
projecter
- skyview projecterisContinuous
- whether projection is known to be continuousjava.lang.IllegalArgumentException
- if the shape is not knownCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.