public class Transform3 extends RealSquareMatrix
TRFORM3_NULL no transformation allowed
ROT_ORIG rotation about the origin
ROT_TRANS rotation and translation
ROT_TRANS_SCALE rotation, translation and single scale factor
ROT_TRANS_AXIAL_SCALE rotation, translation + 3 axial scale factors
ROT_TRANS_SCALE_PERSP rotation, translation, scale, perspective
TRFORM3_ANY any matrix at all - user beware!
The basic stuff is all there - the user will do best to look at examples.
| Modifier and Type | Class and Description |
|---|---|
static class |
Transform3.Type
type
|
cols, flmat, rowsC_AMP, C_APOS, C_ATSIGN, C_BACKSLASH, C_BACKSPACE, C_CARET, C_COLON, C_COMMA, C_DEL, C_DOLLAR, C_EQUALS, C_FORMFEED, C_HASH, C_LANGLE, C_LBRAK, C_LCURLY, C_LSQUARE, C_MINUS, C_NBSP, C_NEWLINE, C_NL, C_PERCENT, C_PERIOD, C_PIPE, C_PLUS, C_POUND, C_QUERY, C_QUOT, C_RANGLE, C_RBRAK, C_RCURLY, C_RETURN, C_RSQUARE, C_SEMICOLON, C_SHRIEK, C_SLASH, C_SPACE, C_STAR, C_TAB, C_TILDE, C_UNDER, EPS, F_S, NONWHITEPUNC, NONWHITEPUNC0, NONWHITEPUNC0REGEX, ONE_THIRD, PUNC, S_AMP, S_APOS, S_ATSIGN, S_BACKSLASH, S_CARET, S_COLON, S_COMMA, S_DOLLAR, S_EMPTY, S_EQUALS, S_FORMFEED, S_HASH, S_LANGLE, S_LBRAK, S_LCURLY, S_LSQUARE, S_MINUS, S_NEWLINE, S_NL, S_PERCENT, S_PERIOD, S_PIPE, S_PLUS, S_POUND, S_QUERY, S_QUOT, S_RANGLE, S_RBRAK, S_RCURLY, S_RETURN, S_RSQUARE, S_SEMICOLON, S_SHRIEK, S_SLASH, S_SPACE, S_STAR, S_TAB, S_TILDE, S_UNDER, S_WHITEREGEX, TWO_THIRDS, U_S, WHITESPACE| Constructor and Description |
|---|
Transform3()
construct unit matrix T = I
|
Transform3(Angle xrot,
Angle yrot,
Angle zrot)
from rotation about the three orthogonal axes.
|
Transform3(Axis.Axis3 axis,
Angle rot)
from rotation about an axis.
|
Transform3(double[] array)
From array.
|
Transform3(Line3 l,
Angle a)
Rotation about a line.
|
Transform3(RealSquareMatrix m)
from a matrix.
|
Transform3(RealSquareMatrix m,
Vector3 v)
from a matrix and vector.
|
Transform3(String opString)
from a crystallographic operator.
|
Transform3(Transform3.Type t)
This gives a default unit matrix of type t.
|
Transform3(Transform3 m)
copy constructor.
|
Transform3(Transform3 t,
Point3 p)
from rotation about a point.
|
Transform3(Vector3 v)
identity matrix with translation component.
|
Transform3(Vector3 v,
Angle a)
from rotation about a vector.
|
Transform3(Vector3 v1,
Vector3 v2)
rotation of one vector onto another.
|
Transform3(Vector3 v1,
Vector3 v2,
Vector3 v3)
from 3 vector components.
|
| Modifier and Type | Method and Description |
|---|---|
static Transform3 |
applyScale(double scale)
apply scale to each axis
|
static Transform3 |
applyScales(double scaleX,
double scaleY,
double scaleZ)
apply scales to each axis
|
Transform3.Type |
checkMatrix()
get new matrix type.
|
static void |
checkNotNull(Transform3 t)
check not null
|
Transform3 |
clone(Transform3 m)
clone.
|
Transform3 |
concatenate(Transform3 m2)
concatenate.
|
int |
getAxisAndAngle(Vector3 axis,
Angle ang)
interpret current matrix as rotation about general axis.
|
Point3 |
getCentreOfRotation()
get centre of rotation.
|
String |
getCrystallographicString()
return operator in crystallographic form;
|
RealSquareMatrix |
getRotationMatrix()
get Unitary matrix.
|
RealArray |
getScales()
get scales.
|
Transform3.Type |
getTransformationType()
get transformation type.
|
Vector3 |
getTranslation()
get translation component.
|
void |
incrementTranslation(Vector3 dt)
increment translation component.
|
boolean |
isEqualTo(Transform3 m)
equality of two transforms.
|
int |
setTransformationType(Transform3.Type option)
set transformation type.
|
void |
setTranslation(Vector3 t)
set translation component.
|
calculateEigenvalues, calculateEigenvectors, calculateInverse, copyLowerToUpper, copyUpperToLower, determinant, diagonal, diagonaliseAndReturnRank, fromLowerTriangle, fromUpperTriangle, getCrystallographicOrthogonalisation, getInverse, isEqualTo, isImproperRotation, isLowerTriangular, isOrthogonal, isOrthonormal, isSymmetric, isUnit, isUnitary, isUpperTriangular, lowerTriangle, multiply, orthogonalise, orthonormalize, outerProduct, plus, resetEigenDecomposition, shallowCopy, subtract, trace, transposeappendColumnData, appendColumnData, appendRowData, appendRowData, checkNonEmptyMatrix, clearMatrix, columnwiseDivide, createMatrixWithOriginShifted, deleteColumn, deleteColumns, deleteRow, deleteRows, elementAt, elementAt, elementsInRange, euclideanColumnLength, euclideanColumnLengths, euclideanRowLength, euclideanRowLengths, extractColumnData, extractColumns, extractRowData, extractRows, extractSubMatrixData, format, getCols, getFormat, getIntMatrix, getMatrix, getMatrixAsArray, getRows, getTranspose, indexOfLargestElement, indexOfLargestElementInColumn, indexOfLargestElementInRow, indexOfSmallestElement, indexOfSmallestElementInColumn, indexOfSmallestElementInRow, insertColumnData, insertColumnData, insertRowData, insertRowData, insertRows, isEqualTo, isSquare, isZero, largestElement, largestElementInColumn, largestElementInRow, makeSpaceForNewColumns, multiply, multiply, multiplyBy, multiplyEquals, negative, normaliseByColumns, normaliseByRows, plus, reorderColumnsBy, reorderRowsBy, replaceColumnData, replaceColumnData, replaceColumnData, replaceRowData, replaceRowData, replaceRowData, replaceSubMatrixData, scaleAndInterpolate, setAllElements, setElementAt, setFormat, shallowCopy, smallestElement, smallestElementInColumn, smallestElementInRow, subtract, toString, translateByColumn, writeXMLpublic Transform3()
public Transform3(Transform3.Type t)
t - typepublic Transform3(Vector3 v)
v - translation vectorpublic Transform3(Axis.Axis3 axis, Angle rot)
axis - Choice.X, etcrot - angle to rotate bypublic Transform3(Angle xrot, Angle yrot, Angle zrot)
xrot - yrot - zrot - public Transform3(Transform3 t, Point3 p)
t - rotation matrixp - point to rotate aboutpublic Transform3(Vector3 v, Angle a)
v - vector to rotate abouta - angle to rotate bypublic Transform3(Line3 l, Angle a)
l - line to rotate abouta - angle to rotate bypublic Transform3(Vector3 v1, Vector3 v2)
v1 - vector to rotatev2 - vector to rotate v1 ontopublic Transform3(Vector3 v1, Vector3 v2, Vector3 v3)
v1 - first row of Tv2 - second row of Tv3 - third row of Tpublic Transform3(double[] array)
throws EuclidRuntimeException
array - copied to m00, m01, m02, m03, m10 ...EuclidRuntimeException - array must have 16 elementspublic Transform3(Transform3 m)
m - transform to copypublic Transform3(RealSquareMatrix m) throws EuclidRuntimeException
m - 3x3 or 4x4 matrixEuclidRuntimeException - m must be 3*3 or 4*4public Transform3(RealSquareMatrix m, Vector3 v) throws EuclidRuntimeException
m - 3x3 rotation matrixv - translation vectorEuclidRuntimeException - m must be 3*3public Transform3(String opString) throws EuclidRuntimeException
opString - for example 1/2-x,1/2+y,-z
extended to 0.5+x, y-0.25, z // etcEuclidRuntimeException - corrupt/invalid stringpublic static Transform3 applyScales(double scaleX, double scaleY, double scaleZ)
scaleX - scaleY - scaleZ - public static Transform3 applyScale(double scale)
scale - public Transform3 clone(Transform3 m)
m - public boolean isEqualTo(Transform3 m)
m - transform to comparepublic Transform3 concatenate(Transform3 m2)
m2 - transform to be concatenatedpublic int setTransformationType(Transform3.Type option)
option - the typepublic Transform3.Type getTransformationType()
public Transform3.Type checkMatrix()
public int getAxisAndAngle(Vector3 axis, Angle ang)
axis - (holds return values)ang - angle (holds return value)public Vector3 getTranslation()
public void incrementTranslation(Vector3 dt)
dt - translation incrementpublic void setTranslation(Vector3 t)
t - translation vectorpublic Point3 getCentreOfRotation()
public RealArray getScales()
public RealSquareMatrix getRotationMatrix()
public String getCrystallographicString()
public static void checkNotNull(Transform3 t)
t - transform3Copyright © 1994–2024 Peter Murray-Rust. All rights reserved.