Package uk.ac.starlink.ttools.plot2.geom
Class FixedSkyviewProjection
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.geom.SkyviewProjection
-
- uk.ac.starlink.ttools.plot2.geom.FixedSkyviewProjection
-
- All Implemented Interfaces:
Projection
public abstract class FixedSkyviewProjection extends SkyviewProjection
SkyviewProjection subclass that does not use mouse gestures to rotate the sky, only to pan and zoom over the projected plane.- Since:
- 12 Mar 2019
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description static FixedSkyviewProjection
AIT
Aitoff projection, lon=0 at center.static FixedSkyviewProjection
AIT0
Aitoff projection, lon=0 at edge.static FixedSkyviewProjection
CAR0
Cartesian projection, lon=0 at edge.static FixedSkyviewProjection
CAR1
Cartesian projection, lon=0 at center.static FixedSkyviewProjection
TAN
Gnomonic projection.
-
Constructor Summary
Constructors Modifier Constructor Description protected
FixedSkyviewProjection(skyview.geometry.Projecter projecter, java.awt.Shape shape, java.lang.String name, java.lang.String description)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SkyAspect
createAspect(boolean reflect, double[] r3, double radiusRad, Range[] ranges)
Creates a SkyAspect from configuration information.double[]
cursorRotate(double[] rotmat, java.awt.geom.Point2D.Double pos0, java.awt.geom.Point2D.Double pos1)
Returns null - rotation not implemented.protected abstract double[]
getFixedRotation(boolean reflect)
Returns the fixed rotation matrix to use for this projection.SkyFov
getFov(SkySurface surf)
Returns the field of view represented by this aspect.double[]
projRotate(double[] rotmat, java.awt.geom.Point2D.Double pos0, java.awt.geom.Point2D.Double pos1)
Returns null - rotation not implemented.boolean
useRanges(boolean reflect, double[] r3, double radiusRad)
Returns false - ranging not used.-
Methods inherited from class uk.ac.starlink.ttools.plot2.geom.SkyviewProjection
getProjectionDescription, getProjectionName, getProjectionShape, getSkyviewProjecter, project, unproject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.ac.starlink.ttools.plot2.geom.Projection
isContinuous, isContinuousLine
-
-
-
-
Field Detail
-
AIT
public static final FixedSkyviewProjection AIT
Aitoff projection, lon=0 at center.
-
AIT0
public static final FixedSkyviewProjection AIT0
Aitoff projection, lon=0 at edge.
-
CAR1
public static final FixedSkyviewProjection CAR1
Cartesian projection, lon=0 at center.
-
CAR0
public static final FixedSkyviewProjection CAR0
Cartesian projection, lon=0 at edge.
-
TAN
public static final FixedSkyviewProjection TAN
Gnomonic projection.
-
-
Constructor Detail
-
FixedSkyviewProjection
protected FixedSkyviewProjection(skyview.geometry.Projecter projecter, java.awt.Shape shape, java.lang.String name, java.lang.String description)
Constructor.- Parameters:
projecter
- projecter objectshape
- shape of the sky in this projectionname
- projection namedescription
- projection description
-
-
Method Detail
-
getFixedRotation
protected abstract double[] getFixedRotation(boolean reflect)
Returns the fixed rotation matrix to use for this projection.- Parameters:
reflect
- true to reflect longitude- Returns:
- rotation matrix
-
cursorRotate
public double[] cursorRotate(double[] rotmat, java.awt.geom.Point2D.Double pos0, java.awt.geom.Point2D.Double pos1)
Returns null - rotation not implemented.- Parameters:
rotmat
- initial rotation matrixpos0
- initial cursor positionpos1
- destination cursor position- Returns:
- destination rotation matrix, or null
-
projRotate
public double[] projRotate(double[] rotmat, java.awt.geom.Point2D.Double pos0, java.awt.geom.Point2D.Double pos1)
Returns null - rotation not implemented.- Parameters:
rotmat
- initial rotation matrixpos0
- initial projected positionpos1
- destination projected position- Returns:
- destination rotation matrix, or null
-
useRanges
public boolean useRanges(boolean reflect, double[] r3, double radiusRad)
Returns false - ranging not used.- Parameters:
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)- Returns:
- true if ranges would be useful given the other arguments
- See Also:
SurfaceFactory.readRanges(P, uk.ac.starlink.ttools.plot2.PlotLayer[], uk.ac.starlink.ttools.plot2.data.DataStore)
-
createAspect
public SkyAspect createAspect(boolean reflect, double[] r3, double radiusRad, Range[] ranges)
Description copied from interface:Projection
Creates a SkyAspect from configuration information. Either the supplied field of view or data ranges may be used, or neither.- Parameters:
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 data- Returns:
- new sky aspect
- See Also:
SurfaceFactory.createAspect(P, uk.ac.starlink.ttools.plot2.config.ConfigMap, uk.ac.starlink.ttools.plot.Range[])
-
getFov
public SkyFov getFov(SkySurface surf)
Description copied from interface:Projection
Returns the field of view represented by this aspect. This is a best estimate, it may be approximate depending on the projection geometry. If the field of view is the default for this projection, then null should be returned. Null may also be returned if for some reason no field of view can be determined.- Parameters:
surf
- sky surface, which must be set up using this projection- Returns:
- field of view, or null
-
-