meshi.symmetryComplex.transformations
Class Transformation

java.lang.Object
  extended by meshi.symmetryComplex.transformations.Matrix1D
      extended by meshi.symmetryComplex.transformations.Transformation
All Implemented Interfaces:
Matrix
Direct Known Subclasses:
SingleAxisRotationTransformation

public class Transformation
extends Matrix1D

This class represents a transformation on points in space. A 'legal' transformation can only be composed from translation and/or rotation transformation, even though scale transformations exist.


Field Summary
 
Fields inherited from class meshi.symmetryComplex.transformations.Matrix1D
columns, matrix, rows
 
Constructor Summary
Transformation()
           
Transformation(double[][] arrayMatrix)
          Transformation constructor which can handle double[4][4] and double[3][3].
Transformation(double x, double y, double z, double theta)
          Axis-angle constructor.
Transformation(Matrix other)
           
 
Method Summary
 Transformation compose(Transformation other)
           
private  void expandToSquareFour(double[][] arrayMatrix)
           
static boolean isLegalTransformation(Matrix other)
          A legal transformation is composed of translation and/or rotation only.
Such matrices have the following attribute: The 3x3 submatrix [0..2]x[0..2] is orthogonal.
Orthogonality is tested in this way: A given matrix is orthogonal iff when multiplying it by its transposed matrix the result is the unit matrix.
 double[] transform(double[] xyz)
           
 double[][] transform(double[][] xyz)
           
 
Methods inherited from class meshi.symmetryComplex.transformations.Matrix1D
double2DToMatrix, equals, equals, getColumns, getMember, getRows, getSubmatrix, getUnitMatrix, initFields, isLegalIndices, isLegalMatrixObject, isLegalSubmatrixBoundaries, isOrthogonal, isZero, matrixToDouble2D, multiply, setMember, toString, transpose
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Transformation

public Transformation()

Transformation

public Transformation(Matrix other)

Transformation

public Transformation(double[][] arrayMatrix)
Transformation constructor which can handle double[4][4] and double[3][3]. Everything else causes a RuntimeException, by MatrixAsDouble2D if the argument isn't a matrix at all else by this constructor.

Parameters:
arrayMatrix - the double[][] to be used for constructing this Transformation.

Transformation

public Transformation(double x,
                      double y,
                      double z,
                      double theta)
Axis-angle constructor. The axis is given as xyz coordinates. Assumes that the magnitude of the axis is 1 and that theta is given in radians. Code adapted from here.

Method Detail

expandToSquareFour

private void expandToSquareFour(double[][] arrayMatrix)

isLegalTransformation

public static boolean isLegalTransformation(Matrix other)
A legal transformation is composed of translation and/or rotation only.
Such matrices have the following attribute: The 3x3 submatrix [0..2]x[0..2] is orthogonal.
Orthogonality is tested in this way: A given matrix is orthogonal iff when multiplying it by its transposed matrix the result is the unit matrix.


compose

public Transformation compose(Transformation other)

transform

public double[][] transform(double[][] xyz)

transform

public double[] transform(double[] xyz)