public class HemisphereProjection extends Object implements Projection
Constructor and Description |
---|
HemisphereProjection()
Constructs a HemisphereProjection with default characteristics.
|
HemisphereProjection(boolean upNorth)
Constructs a HemisphereProjection optionally
with north fixed pointing up.
|
Modifier and Type | Method and Description |
---|---|
SkyAspect |
createAspect(boolean reflect,
double[] r3,
double radiusRad,
Range[] ranges)
Creates a SkyAspect from configuration information.
|
double[] |
cursorRotate(double[] rot0,
Point2D.Double pos0,
Point2D.Double pos1)
Attempts to return a rotation matrix corresponding to moving the
cursor between two plane positions.
|
boolean |
equals(Object o) |
SkyFov |
getFov(SkySurface surf)
Returns the field of view represented by this aspect.
|
String |
getProjectionDescription()
Returns a short description of the projection.
|
String |
getProjectionName()
Returns the projection name.
|
Shape |
getProjectionShape()
Returns the shape which encloses all the plane positions to which
legal sky coordinates can be projected.
|
int |
hashCode() |
boolean |
isContinuous()
Indicates whether this projection is known to be continous over
its whole range.
|
boolean |
isContinuousLine(double[] r3a,
double[] r3b)
Indicates whether a line between the two given sky positions
is (believed to be) continuous.
|
boolean |
project(double rx,
double ry,
double rz,
Point2D.Double pos)
Transforms a sky position to a plane position.
|
double[] |
projRotate(double[] rot0,
Point2D.Double pos0,
Point2D.Double pos1)
Attempts to return a rotation matrix that will transform
a sky position from one plane position to another.
|
boolean |
unproject(Point2D.Double ppos,
double[] r3)
Transforms a plane position to a sky position.
|
boolean |
useRanges(boolean reflect,
double[] r3,
double radiusRad)
Indicates whether ranges should be provided to generate a SkyAspect.
|
public HemisphereProjection()
public HemisphereProjection(boolean upNorth)
upNorth
- whether north is fixed to align with the
screen Y directionpublic String getProjectionName()
Projection
getProjectionName
in interface Projection
public String getProjectionDescription()
Projection
getProjectionDescription
in interface Projection
public boolean isContinuous()
Projection
isContinuousLine
returns false.isContinuous
in interface Projection
public boolean isContinuousLine(double[] r3a, double[] r3b)
Projection
isContinuousLine
in interface Projection
r3a
- 3-element array giving normalised X,Y,Z coordinates of
line startr3b
- 3-element array giving normalised X,Y,Z coordinates of
line endpublic boolean project(double rx, double ry, double rz, 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(Point2D.Double ppos, double[] r3)
Projection
unproject
in interface Projection
ppos
- contains dimensionless X,Y coordinates of plane positionr3
- 3-element array into which normalised X,Y,Z sky coordinates
will be written on successpublic Shape getProjectionShape()
Projection
getProjectionShape
in interface Projection
public double[] cursorRotate(double[] rot0, Point2D.Double pos0, Point2D.Double pos1)
Projection
projRotate
,
for both positions on the sky, and provide some other intuitive
behaviour if one or both is out of the projection range.
Null may be returned if this projection does not support rotation.
cursorRotate
in interface Projection
rot0
- initial rotation matrixpos0
- initial cursor positionpos1
- destination cursor positionpublic double[] projRotate(double[] rot0, Point2D.Double pos0, Point2D.Double pos1)
Projection
Consider a sky point S, rotated by an initial rotation
matrix rotmat
to S', which when projected by
this projection lands on the plane at pos0
.
This method attempts to determine a rotation matrix
which when used instead of rotmat
would
end up with the rotated and projected point at pos1
.
Null may be returned if this projection does not support projection.
projRotate
in interface Projection
rot0
- initial rotation matrixpos0
- initial projected positionpos1
- destination projected positionpublic boolean useRanges(boolean reflect, double[] r3, double radiusRad)
Projection
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 projectionCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.