AffineTransformationFactory class

Supports creating {@link AffineTransformation}s defined by various kinds of inputs and transformation mapping rules.

@author Martin Davis

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

createFromBaseLines(Coordinate src0, Coordinate src1, Coordinate dest0, Coordinate dest1) AffineTransformation
  • Creates an AffineTransformation defined by a mapping between two baselines.
    • The computed transformation consists of:
        • a translation
        • from the start point of the source baseline to the start point of the destination baseline,
        • a rotation through the angle between the baselines about the destination start point,
        • and a scaling equal to the ratio of the baseline lengths.
      • If the source baseline has zero length, an identity transformation is returned.
      • @param src0 the start point of the source baseline
      • @param src1 the end point of the source baseline
      • @param dest0 the start point of the destination baseline
      • @param dest1 the end point of the destination baseline
      • @return the computed transformation
  • createFromControlVectors(Coordinate? src0, Coordinate? dest0) AffineTransformation
  • Creates an AffineTransformation defined by a single control vector. A
    • control vector consists of a source point and a destination point, which is
      • the image of the source point under the desired transformation. This
      • produces a translation.
      • @param src0
      •      the start point of the control vector
        
      • @param dest0
      •      the end point of the control vector
        
      • @return the computed transformation
  • createFromControlVectors2(Coordinate src0, Coordinate src1, Coordinate dest0, Coordinate dest1) AffineTransformation?
  • Creates an AffineTransformation defined by a pair of control vectors. A
    • control vector consists of a source point and a destination point, which is
      • the image of the source point under the desired transformation. The
      • computed transformation is a combination of one or more of a uniform scale,
      • a rotation, and a translation (i.e. there is no shear component and no
      • reflection)
      • @param src0
      • @param src1
      • @param dest0
      • @param dest1
      • @return the computed transformation, or null if the control vectors do not determine a well-defined transformation
  • createFromControlVectors3(Coordinate src0, Coordinate src1, Coordinate src2, Coordinate dest0, Coordinate dest1, Coordinate dest2) AffineTransformation?
  • Creates a transformation from a set of three control vectors. A control
    • vector consists of a source point and a destination point, which is the
      • image of the source point under the desired transformation. Three control
      • vectors allows defining a fully general affine transformation.
      • @param src0
      • @param src1
      • @param src2
      • @param dest0
      • @param dest1
      • @param dest2
      • @return the computed transformation
  • createFromControlVectorsCL(List<Coordinate?> src, List<Coordinate?> dest) AffineTransformation?
  • Creates an AffineTransformation defined by a set of control vectors.
    • Between one and three vectors must be supplied. *
      • @param src
      •      the source points of the vectors
        
      • @param dest
      •      the destination points of the vectors
        
      • @return the computed transformation
      • @throws IllegalArgumentException
      •       if the control vector arrays are too short, long or of different
        
      •       lengths