math.geom2d.transform
Interface AffineTransform2D

All Superinterfaces:
Bijection2D, Transform2D
All Known Subinterfaces:
Isometry2D, LinearTransform2D, Motion2D, Similarity2D
All Known Implementing Classes:
AbstractAffineTransform2D, AbstractAffineTransform2D.Identity2D, GenericAffineTransform2D, GlideReflection2D, Homothecy2D, LinearHomothecy2D, LinearLineReflection2D, LinearRotation2D, LineReflection2D, PointSymmetry2D, Rotation2D, Scaling2D, Translation2D

public interface AffineTransform2D
extends Bijection2D

Represents any transform which can be expressed via a 3x3 matrix with the last row equal to [0 0 1]. The storage or the computation of the matrix coefficients is left to the implementation.

Specialized interfaces are Isometry2D and Motion2D.

Author:
dlegland

Method Summary
 AffineTransform2D compose(AffineTransform2D transform)
          Return the composition of this affine transform with the given affine transform.
 double[][] getAffineMatrix()
          return matrix of the transform coefficients.
 double[] getCoefficients()
          return coefficients of the transform.
 boolean isDirect()
          Check if the transform is direct, i.e. it preserves the orientation of transformed shapes.
 boolean isIdentity()
          Check if the transform is equivalent to the identity transform.
 boolean isIsometry()
          Check if the transform is an isometry, i.e. a compound of translation, rotation and reflection.
 boolean isMotion()
          Check if the transform is a motion, i.e. a compound of translations and rotation.
 boolean isSimilarity()
           
 
Methods inherited from interface math.geom2d.transform.Bijection2D
getInverseTransform
 
Methods inherited from interface math.geom2d.transform.Transform2D
transform, transform, transform
 

Method Detail

getCoefficients

double[] getCoefficients()
return coefficients of the transform. Result is an array of 6 double.


getAffineMatrix

double[][] getAffineMatrix()
return matrix of the transform coefficients. Result is a 2x3 array of double.


compose

AffineTransform2D compose(AffineTransform2D transform)
Return the composition of this affine transform with the given affine transform. If transforms are represented by matrices this and that, the result can be represented by matrix this*that.

Parameters:
transform - the transform to compose with
Returns:
the composition of this transform with the given transform

isSimilarity

boolean isSimilarity()

isMotion

boolean isMotion()
Check if the transform is a motion, i.e. a compound of translations and rotation. Motion preserves area and orientation (directed or undirected) of shapes unchanged.

Returns:
true in case of motion.

isIsometry

boolean isIsometry()
Check if the transform is an isometry, i.e. a compound of translation, rotation and reflection. Isometries preserves area of shapes unchanged, but can change orientation (directed or undirected).

Returns:
true in case of isometry.

isDirect

boolean isDirect()
Check if the transform is direct, i.e. it preserves the orientation of transformed shapes.

Returns:
true if transform is direct.

isIdentity

boolean isIdentity()
Check if the transform is equivalent to the identity transform.

Returns:
true if the transform is identity