public class Rotation2DHelpers extends Object
Modifier and Type | Field and Description |
---|---|
static double |
eps |
static double |
PI |
static double |
PIo2 |
static double |
PIo2t3 |
static double |
PIt2 |
static double |
sqrt2 |
Constructor and Description |
---|
Rotation2DHelpers() |
Modifier and Type | Method and Description |
---|---|
static double |
angle2d(AffineTransform3D xfm,
int r) |
static void |
angleMult(double[] pt,
double[] res,
double angle) |
static void |
compareCos(AffineTransform3D xfm,
double trueAngle) |
static double |
cosAngle2d(AffineTransform3D xfm) |
static void |
cosSinMult(double[] pt,
double[] res,
double cosAngle,
double sinAngle) |
static double |
determinant2d(AffineTransform2D xfm)
Return the determinant of the 2d transform
|
static double |
determinant2d(AffineTransform3D xfm)
Return the determinant of the top-left 2x2 transformation matrix.
|
static double |
extractRotation(AffineTransform3D xfm) |
static double |
extractScale(AffineTransform3D transform,
int axis) |
static double |
getAngle(double x,
double y)
Returns the angle in radians of the given polar coordinates
correcting Math.atan2 output to a pattern I can digest.
|
static boolean |
isSimilarity(AffineTransform3D xfm) |
static void |
main(String[] args) |
static void |
printXfm(AffineTransform3D transform) |
static void |
printXfm2d(AffineTransform3D xfm) |
static void |
rotateByBasisRow(AffineTransform3D transform,
int row,
boolean clockwise,
double[] tmpRow) |
static void |
rotateByBasisRowCCW(AffineTransform3D transform,
int row,
double[] tmpRow) |
static void |
rotateByBasisRowCW(AffineTransform3D transform,
int row,
double[] tmpRow) |
static double[][] |
rotationToMatrix(double theta) |
static double[][] |
rotationToMatrix(double theta,
boolean isZFlipped) |
static double[][] |
rotationToMatrixLeftHanded(double theta)
Left handed coordinate system.
|
static AffineTransform3D |
rotationToTransform(double theta) |
static AffineTransform3D |
rotationToTransform(double theta,
AffineTransform3D transform) |
static double |
rowMag2d(AffineTransform3D xfm,
int r) |
static double |
shorterAngleBetweenRotations(double angleStart,
double angleEnd)
Returns the shorter angle between the starting and ending angle.
|
static AffineTransform3D |
targetViewerTransform2d(AffineTransform3D currentView,
boolean clockwise) |
static AffineTransform3D |
targetViewerTransform2dOld(AffineTransform3D currentView,
boolean clockwise) |
public static final double PI
public static final double PIo2
public static final double PIo2t3
public static final double PIt2
public static final double sqrt2
public static final double eps
public static void rotateByBasisRow(AffineTransform3D transform, int row, boolean clockwise, double[] tmpRow)
public static void rotateByBasisRowCCW(AffineTransform3D transform, int row, double[] tmpRow)
public static void rotateByBasisRowCW(AffineTransform3D transform, int row, double[] tmpRow)
public static AffineTransform3D targetViewerTransform2d(AffineTransform3D currentView, boolean clockwise)
public static AffineTransform3D targetViewerTransform2dOld(AffineTransform3D currentView, boolean clockwise)
public static double angle2d(AffineTransform3D xfm, int r)
public static void compareCos(AffineTransform3D xfm, double trueAngle)
public static double determinant2d(AffineTransform3D xfm)
xfm
- a 3d transformpublic static double cosAngle2d(AffineTransform3D xfm)
public static double rowMag2d(AffineTransform3D xfm, int r)
public static double determinant2d(AffineTransform2D xfm)
xfm
- a 3d transformpublic static double shorterAngleBetweenRotations(double angleStart, double angleEnd)
angleStart
- starting angleangleEnd
- ending anglepublic static double extractScale(AffineTransform3D transform, int axis)
public static boolean isSimilarity(AffineTransform3D xfm)
public static double extractRotation(AffineTransform3D xfm)
public static double getAngle(double x, double y)
x
- x coordinatey
- y coordinatepublic static void angleMult(double[] pt, double[] res, double angle)
public static void cosSinMult(double[] pt, double[] res, double cosAngle, double sinAngle)
public static double[][] rotationToMatrixLeftHanded(double theta)
theta
- anglepublic static double[][] rotationToMatrix(double theta)
public static double[][] rotationToMatrix(double theta, boolean isZFlipped)
public static AffineTransform3D rotationToTransform(double theta, AffineTransform3D transform)
public static AffineTransform3D rotationToTransform(double theta)
public static void printXfm2d(AffineTransform3D xfm)
public static void printXfm(AffineTransform3D transform)
public static void main(String[] args)
Copyright © 2015–2021 Fiji. All rights reserved.