public final class Transform2S extends Object implements Transform<Point2S>
Transform
interface for spherical 2D points.
This class uses an AffineTransformMatrix3D
to perform spherical point transforms
in Euclidean 3D space.
Instances of this class are guaranteed to be immutable.
Modifier and Type | Method and Description |
---|---|
Point2S |
apply(Point2S pt) |
static Transform2S |
createReflection(Point2S pole)
Create a transform that performs a reflection across the equatorial plane
defined by the given pole point.
|
static Transform2S |
createReflection(Vector3D poleVector)
Create a transform that performs a reflection across the equatorial plane
defined by the given pole point.
|
static Transform2S |
createRotation(Point2S pt,
double angle)
Create a transform that rotates the given angle around
pt . |
static Transform2S |
createRotation(QuaternionRotation quaternion)
Create a transform that performs the given 3D rotation.
|
static Transform2S |
createRotation(Vector3D axis,
double angle)
Create a transform that rotates the given angle around
axis . |
boolean |
equals(Object obj)
Return true if the given object is an instance of
Transform2S
and the underlying Euclidean transform matrices are exactly equal. |
AffineTransformMatrix3D |
getEuclideanTransform()
Get the Euclidean transform matrix underlying the spherical transform.
|
int |
hashCode() |
static Transform2S |
identity()
Return an instance representing the identity transform.
|
Transform2S |
inverse() |
Transform2S |
multiply(Transform2S other)
Multiply the underlying Euclidean transform of this instance by that of the argument, eg,
other * this . |
Transform2S |
premultiply(Transform2S other)
Multiply the underlying Euclidean transform matrix of the argument by that of this instance, eg,
this * other . |
boolean |
preservesOrientation() |
Transform2S |
reflect(Point2S pole)
Apply a reflection across the equatorial plane defined by the given pole point
to this instance.
|
Transform2S |
reflect(Vector3D poleVector)
Apply a reflection across the equatorial plane defined by the given pole vector
to this instance.
|
Transform2S |
rotate(Point2S pt,
double angle)
Apply a rotation of
angle radians around the given point to this instance. |
Transform2S |
rotate(QuaternionRotation quaternion)
Apply the given quaternion rotation to this instance.
|
Transform2S |
rotate(Vector3D axis,
double angle)
Apply a rotation of
angle radians around the given 3D axis to this instance. |
String |
toString() |
public AffineTransformMatrix3D getEuclideanTransform()
public boolean preservesOrientation()
preservesOrientation
in interface Transform<Point2S>
public Transform2S inverse()
public Transform2S rotate(Point2S pt, double angle)
angle
radians around the given point to this instance.pt
- point to rotate aroundangle
- rotation angle in radianspublic Transform2S rotate(Vector3D axis, double angle)
angle
radians around the given 3D axis to this instance.axis
- 3D axis of rotationangle
- rotation angle in radianspublic Transform2S rotate(QuaternionRotation quaternion)
quaternion
- quaternion rotation to applypublic Transform2S reflect(Point2S pole)
pole
- pole point defining the equatorial reflection planepublic Transform2S reflect(Vector3D poleVector)
poleVector
- pole vector defining the equatorial reflection planepublic Transform2S multiply(Transform2S other)
other * this
. The returned transform performs the equivalent of
other
followed by this
.other
- transform to multiply withAffineTransformMatrix3D.multiply(AffineTransformMatrix3D)
public Transform2S premultiply(Transform2S other)
this * other
. The returned transform performs the equivalent of this
followed by other
.other
- transform to multiply withAffineTransformMatrix3D.premultiply(AffineTransformMatrix3D)
public boolean equals(Object obj)
Transform2S
and the underlying Euclidean transform matrices are exactly equal.public static Transform2S identity()
public static Transform2S createRotation(Point2S pt, double angle)
pt
.pt
- point to rotate aroundangle
- angle of rotation in radianspt
public static Transform2S createRotation(Vector3D axis, double angle)
axis
.axis
- 3D axis of rotationangle
- angle of rotation in radiansaxis
public static Transform2S createRotation(QuaternionRotation quaternion)
quaternion
- quaternion instance representing the 3D rotationpublic static Transform2S createReflection(Point2S pole)
pole
- pole point defining the equatorial reflection planepublic static Transform2S createReflection(Vector3D poleVector)
poleVector
- pole vector defining the equatorial reflection planeCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.