Package uk.ac.starlink.ttools.plot2.geom
Class SkyAspect
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.geom.SkyAspect
-
public class SkyAspect extends java.lang.Object
Defines the view of a SkySurface.- Since:
- 20 Feb 2013
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description SkyAspect(double[] rotmat, double zoom, double xoff, double yoff)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
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.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.double[]
getRotation()
Returns rotation matrix.double
getZoom()
Returns zoom factor.int
hashCode()
static double[]
unitMatrix(boolean reflect)
Returns an optionally reflected unit matrix.
-
-
-
Constructor Detail
-
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 Detail
-
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
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
unitMatrix
public static double[] unitMatrix(boolean reflect)
Returns an optionally reflected unit matrix.- Parameters:
reflect
- true for reflection- Returns:
- unit matrix, possibly reflected
-
-