Package uk.ac.starlink.ttools.plot2.geom
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 java.lang.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 protectedSkyviewProjection(skyview.geometry.Projecter projecter, java.awt.Shape shape, java.lang.String name, java.lang.String description)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetProjectionDescription()Returns a short description of the projection.java.lang.StringgetProjectionName()Returns the projection name.java.awt.ShapegetProjectionShape()Returns the shape which encloses all the plane positions to which legal sky coordinates can be projected.skyview.geometry.ProjectergetSkyviewProjecter()Returns the projecter object used by this SkyviewProjection.booleanproject(double rx, double ry, double rz, java.awt.geom.Point2D.Double pos)Transforms a sky position to a plane position.booleanunproject(java.awt.geom.Point2D.Double pos, double[] r3)Transforms a plane position to a sky position.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.ac.starlink.ttools.plot2.geom.Projection
createAspect, cursorRotate, getFov, isContinuous, isContinuousLine, projRotate, useRanges
-
-
-
-
Constructor Detail
-
SkyviewProjection
protected SkyviewProjection(skyview.geometry.Projecter projecter, java.awt.Shape shape, java.lang.String name, java.lang.String description)Constructor.- Parameters:
projecter- projecter objectshape- shape of the sky in this projectionname- projection namedescription- projection description
-
-
Method Detail
-
getProjectionName
public java.lang.String getProjectionName()
Description copied from interface:ProjectionReturns the projection name.- Specified by:
getProjectionNamein interfaceProjection- Returns:
- user-directed projection name
-
getProjectionDescription
public java.lang.String getProjectionDescription()
Description copied from interface:ProjectionReturns a short description of the projection. return projection description- Specified by:
getProjectionDescriptionin interfaceProjection
-
getProjectionShape
public java.awt.Shape getProjectionShape()
Description copied from interface:ProjectionReturns 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:
getProjectionShapein interfaceProjection- Returns:
- projected sky shape
-
project
public boolean project(double rx, double ry, double rz, java.awt.geom.Point2D.Double pos)Description copied from interface:ProjectionTransforms a sky position to a plane position.- Specified by:
projectin interfaceProjection- Parameters:
rx- normalised 3D X coordinatery- normalised 3D Y coordinaterz- normalised 3D Z coordinatepos- point object into which projected dimensionless X,Y coordinates will be written on success- Returns:
- true if transformation succeeded
-
unproject
public boolean unproject(java.awt.geom.Point2D.Double pos, double[] r3)Description copied from interface:ProjectionTransforms a plane position to a sky position.- Specified by:
unprojectin interfaceProjection- Parameters:
pos- contains dimensionless X,Y coordinates of plane positionr3- 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
-
-