Package uk.ac.starlink.ttools.plot2.geom
Class Rotation
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.Rotation
Rotates vectors between sky systems.
- Since:
- 20 Apr 2016
- Author:
- Mark Taylor
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Rotation()
Protected no-arg constructor of abstract class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Rotation
createRotation
(SkySys inSys, SkySys outSys) Returns a rotation instance that can transform between two submitted sky systems.abstract double[]
Returns the 9-element matrix defining this rotation.abstract Rotation
invert()
Returns the inverse of this rotation.static boolean
isIdentityRotation
(SkySys inSys, SkySys outSys) Indicates whether the rotation between two sky systems is known to be an identity (no-op) transformation.abstract void
rotate
(double[] r3) Rotates a 3-vector in place.
-
Field Details
-
IDENTITY
Identity rotation; the rotate method is a no-op.
-
-
Constructor Details
-
Rotation
protected Rotation()Protected no-arg constructor of abstract class.
-
-
Method Details
-
rotate
public abstract void rotate(double[] r3) Rotates a 3-vector in place.- Parameters:
r3
- 3-element unit vector, changed on output
-
invert
Returns the inverse of this rotation.- Returns:
- inverse rotation
-
getMatrix
public abstract double[] getMatrix()Returns the 9-element matrix defining this rotation.- Returns:
- 9-element rotation matrix
-
isIdentityRotation
Indicates whether the rotation between two sky systems is known to be an identity (no-op) transformation. If either or both sky systems is null, it is assumed that no rotation is required.- Parameters:
inSys
- input sky system; may be nulloutSys
- output sky system; may be null- Returns:
- true iff no rotation operation is required
-
createRotation
Returns a rotation instance that can transform between two submitted sky systems.- Parameters:
inSys
- input sky system; may be nulloutSys
- output sky system; may be null- Returns:
- rotation from input to output sky systems, not null
-