uk.ac.starlink.ttools.plot2.geom
Class SkyAspect

java.lang.Object
  extended by 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
SkyAspect(Projection projection, boolean reflect)
          Constructs a default aspect from a given projection.
SkyAspect(Projection projection, double[] rotmat, double zoom, double xoff, double yoff)
          Constructor.
 
Method Summary
 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.
 Projection getProjection()
          Returns sky projection.
static Projection[] getProjections()
          Returns known projection options.
 double[] getRotation()
          Returns rotation matrix.
 double getZoom()
          Returns zoom factor.
 int hashCode()
           
 boolean isReflected()
          Indicates whether the rotation matrix includes a reflection.
static double[] unitMatrix(boolean reflect)
          Returns an optionally reflected unit matrix.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkyAspect

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

Parameters:
projection - sky projection
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

SkyAspect

public SkyAspect(Projection projection,
                 boolean reflect)
Constructs a default aspect from a given projection.

Parameters:
projection - sky projection
reflect - whether longitude runs right to left
Method Detail

getProjection

public Projection getProjection()
Returns sky projection.

Returns:
projection

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

isReflected

public boolean isReflected()
Indicates whether the rotation matrix includes a reflection.

Returns:
true iff longitude runs right to left (or equivalent)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getProjections

public static Projection[] getProjections()
Returns known projection options.

Returns:
list of available projections

unitMatrix

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

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


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.