AffineTransformationBuilder class
Builds an {@link AffineTransformation} defined by a set 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.
A transformation is well-defined by a set of three control vectors if and only if the source points are not collinear. (In particular, the degenerate situation where two or more source points are identical will not produce a well-defined transformation). A well-defined transformation exists and is unique. If the control vectors are not well-defined, the system of equations defining the transformation matrix entries is not solvable, and no transformation can be determined.
No such restriction applies to the destination points. However, if the destination points are collinear or non-unique, a non-invertible transformations will be generated.
This technique of recovering a transformation from its effect on known points is used in the Bilinear Interpolated Triangulation algorithm for warping planar surfaces.
@author Martin Davis
Constructors
- AffineTransformationBuilder(Coordinate src0, Coordinate src1, Coordinate src2, Coordinate dest0, Coordinate dest1, Coordinate dest2)
- Constructs a new builder for the transformation defined by the given set of control point mappings.
Properties
- dest0 ↔ Coordinate
-
getter/setter pair
- dest1 ↔ Coordinate
-
getter/setter pair
- dest2 ↔ Coordinate
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- m00 ↔ double
-
getter/setter pair
- m01 ↔ double
-
getter/setter pair
- m02 ↔ double
-
getter/setter pair
- m10 ↔ double
-
getter/setter pair
- m11 ↔ double
-
getter/setter pair
- m12 ↔ double
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- src0 ↔ Coordinate
-
getter/setter pair
- src1 ↔ Coordinate
-
getter/setter pair
- src2 ↔ Coordinate
-
getter/setter pair
Methods
-
compute(
) → bool - Computes the transformation matrix by solving the two systems of linear equations defined by the control point mappings, if this is possible.
-
getTransformation(
) → AffineTransformation? -
Computes the {@link AffineTransformation}
determined by the control point mappings,
or
null
if the control vectors do not determine a well-defined transformation. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
solve(
List< double> b) → List<double?> ? - Solves the transformation matrix system of linear equations for the given right-hand side vector.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited