com.vividsolutions.jump.geom
Class AffineTransformationBuilder

java.lang.Object
  extended by com.vividsolutions.jump.geom.AffineTransformationBuilder

public class AffineTransformationBuilder
extends java.lang.Object

Builds an AffineTransformation defined by three control points and their images under the transformation. This technique of recovering a transformation from its effect on known points is used in the Bilinear Interpolated Triangulation algorithm for warping planar surfaces.

A transformation is well-defined by a set of 3 control points as long as the set of points is not collinear (this includes the degenerate situation where two or more points are identical). If the control points are not well-defined, the system of equations defining the transformation matrix entries is not solvable, and no transformation can be determined.

Author:
Martin Davis

Constructor Summary
AffineTransformationBuilder(com.vividsolutions.jts.geom.Coordinate src0, com.vividsolutions.jts.geom.Coordinate src1, com.vividsolutions.jts.geom.Coordinate src2, com.vividsolutions.jts.geom.Coordinate dest0, com.vividsolutions.jts.geom.Coordinate dest1, com.vividsolutions.jts.geom.Coordinate dest2)
          Constructs a new builder for the transformation defined by the given set of control point mappings.
 
Method Summary
 AffineTransformation getTransformation()
          Computes the AffineTransformation determined by the control point mappings, or null if the control points do not determine a unique transformation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AffineTransformationBuilder

public AffineTransformationBuilder(com.vividsolutions.jts.geom.Coordinate src0,
                                   com.vividsolutions.jts.geom.Coordinate src1,
                                   com.vividsolutions.jts.geom.Coordinate src2,
                                   com.vividsolutions.jts.geom.Coordinate dest0,
                                   com.vividsolutions.jts.geom.Coordinate dest1,
                                   com.vividsolutions.jts.geom.Coordinate dest2)
Constructs a new builder for the transformation defined by the given set of control point mappings.

Parameters:
src0 - a control point
src1 - a control point
src2 - a control point
dest0 - the image of control point 0 under the required transformation
dest1 - the image of control point 1 under the required transformation
dest2 - the image of control point 2 under the required transformation
Method Detail

getTransformation

public AffineTransformation getTransformation()
Computes the AffineTransformation determined by the control point mappings, or null if the control points do not determine a unique transformation.

Returns:
an affine transformation