# Class SkyviewProjection

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

All Implemented Interfaces:
  `Projection`

Direct Known Subclasses:
  `FixedSkyviewProjection, SinProjection`

public abstract class SkyviewProjection extends Object implements Projection
Partial projection implementation based on classes from the Skyview package.

Since:
  21 Feb 2013
Author:
  Mark Taylor

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`SkyviewProjection(skyview.geometry.Projecter projecter, Shape shape, String name, String description)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`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.
`skyview.geometry.Projecter`
`getSkyviewProjecter()`
Returns the projecter object used by this SkyviewProjection.
`boolean`
`project(double rx, double ry, double rz, Point2D.Double pos)`
Transforms a sky position to a plane position.
`boolean`
`unproject(Point2D.Double pos, double[] r3)`
Transforms a plane position to a sky position.

### Methods inherited from class Object

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

### Methods inherited from interface Projection

`createAspect, cursorRotate, getFov, isContinuous, isContinuousLine, projRotate, useRanges`

## Constructor Details

### SkyviewProjection

protected SkyviewProjection(skyview.geometry.Projecter projecter, Shape shape, String name, String description)
Constructor.

Parameters:
  `projecter` - projecter object
  `shape` - shape of the sky in this projection
  `name` - projection name
  `description` - projection description

## Method Details

### getProjectionName

public String getProjectionName()
Description copied from interface: `Projection`
Returns the projection name.

Specified by:
  `getProjectionName` in interface `Projection`
Returns:
  user-directed projection name

### getProjectionDescription

public String getProjectionDescription()
Description copied from interface: `Projection`
Returns a short description of the projection. return projection description

Specified by:
  `getProjectionDescription` in interface `Projection`

### getProjectionShape

public Shape getProjectionShape()
Description copied from interface: `Projection`
Returns the shape which encloses all the plane positions to which legal sky coordinates can be projected. Typically this has linear dimensions of the order of PI.

Specified by:
  `getProjectionShape` in interface `Projection`
Returns:
  projected sky shape

### project

public boolean project(double rx, double ry, double rz, Point2D.Double pos)
Description copied from interface: `Projection`
Transforms a sky position to a plane position.

Specified by:
  `project` in interface `Projection`
Parameters:
  `rx` - normalised 3D X coordinate
  `ry` - normalised 3D Y coordinate
  `rz` - normalised 3D Z coordinate
  `pos` - point object into which projected dimensionless X,Y coordinates will be written on success
Returns:
  true if transformation succeeded

### unproject

public boolean unproject(Point2D.Double pos, double[] r3)
Description copied from interface: `Projection`
Transforms a plane position to a sky position.

Specified by:
  `unproject` in interface `Projection`
Parameters:
  `pos` - contains dimensionless X,Y coordinates of plane position
  `r3` - 3-element array into which normalised X,Y,Z sky coordinates will be written on success
Returns:
  true if transformation succeeded

### getSkyviewProjecter

public skyview.geometry.Projecter getSkyviewProjecter()
Returns the projecter object used by this SkyviewProjection.

Returns:
  projecter