# Class SkyAspect

java.lang.Object
uk.ac.starlink.ttools.plot2.geom.SkyAspect

public class SkyAspect extends 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

Modifier and Type
Method
Description
`boolean`
`equals(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.

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SkyAspect

public SkyAspect(double[] rotmat, double zoom, double xoff, double yoff)
Constructor.

Parameters:
  `rotmat` - 9-element rotation matrix
  `zoom` - zoom factor; 1 means the sky is approximately the same size as plot bounds
  `xoff` - x offset of plot centre from plot bounds centre in dimensionless units; 0 is centred
  `yoff` - 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

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### unitMatrix

public static double[] unitMatrix(boolean reflect)
Returns an optionally reflected unit matrix.

Parameters:
  `reflect` - true for reflection
Returns:
  unit matrix, possibly reflected