Package uk.ac.starlink.ttools.plot2.geom
Class SkyAspect
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.SkyAspect
Defines the view of a SkySurface.
- Since:
- 20 Feb 2013
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionSkyAspect
(double[] rotmat, double zoom, double xoff, double yoff) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
double
Returns the offset in the graphical X direction of the centre of the sky drawing from the centre of the available plotting region.double
Returns the offset in the graphical Y direction of the centre of the sky drawingn from the centre of the available plotting region.double[]
Returns rotation matrix.double
getZoom()
Returns zoom factor.int
hashCode()
static double[]
unitMatrix
(boolean reflect) Returns an optionally reflected unit matrix.
-
Constructor Details
-
SkyAspect
public SkyAspect(double[] rotmat, double zoom, double xoff, double yoff) Constructor.- Parameters:
rotmat
- 9-element rotation matrixzoom
- zoom factor; 1 means the sky is approximately the same size as plot boundsxoff
- x offset of plot centre from plot bounds centre in dimensionless units; 0 is centredyoff
- y offset of plot centre from plot bounds centre in dimensionless units; 0 is centred
-
-
Method Details
-
getRotation
public double[] getRotation()Returns rotation matrix.- Returns:
- 9-element coordinate rotation matrix
-
getZoom
public double getZoom()Returns zoom factor. A value of 1 means the whole sky takes up approximately all the available plotting region.- Returns:
- zoom factor
-
getOffsetX
public double getOffsetX()Returns the offset in the graphical X direction of the centre of the sky drawing from the centre of the available plotting region. Units are dimensionless; 0 is centred.- Returns:
- x offset
-
getOffsetY
public double getOffsetY()Returns the offset in the graphical Y direction of the centre of the sky drawingn from the centre of the available plotting region. Units are dimensionless; 0 is centred.- Returns:
- y offset
-
equals
-
hashCode
public int hashCode() -
unitMatrix
public static double[] unitMatrix(boolean reflect) Returns an optionally reflected unit matrix.- Parameters:
reflect
- true for reflection- Returns:
- unit matrix, possibly reflected
-