class AffineTransformation extends Cloneable with CoordinateSequenceFilter

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AffineTransformation
  2. CoordinateSequenceFilter
  3. Cloneable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new AffineTransformation(src0: Coordinate, src1: Coordinate, src2: Coordinate, dest0: Coordinate, dest1: Coordinate, dest2: Coordinate)

    Constructs a transformation which maps the given source points into the given destination points.

    Constructs a transformation which maps the given source points into the given destination points.

    src0

    source point 0

    src1

    source point 1

    src2

    source point 2

    dest0

    the mapped point for source point 0

    dest1

    the mapped point for source point 1

    dest2

    the mapped point for source point 2

  2. new AffineTransformation(trans: AffineTransformation)

    Constructs a transformation which is a copy of the given one.

    Constructs a transformation which is a copy of the given one.

    trans

    the transformation to copy

  3. new AffineTransformation(m00: Double, m01: Double, m02: Double, m10: Double, m11: Double, m12: Double)

    Constructs a new transformation whose matrix has the specified values.

    Constructs a new transformation whose matrix has the specified values.

    m00

    the entry for the [0, 0] element in the transformation matrix

    m01

    the entry for the [0, 1] element in the transformation matrix

    m02

    the entry for the [0, 2] element in the transformation matrix

    m10

    the entry for the [1, 0] element in the transformation matrix

    m11

    the entry for the [1, 1] element in the transformation matrix

    m12

    the entry for the [1, 2] element in the transformation matrix

  4. new AffineTransformation(matrix: Array[Double])

    Constructs a new transformation whose matrix has the specified values.

    Constructs a new transformation whose matrix has the specified values.

    matrix

    an array containing the 6 values { m00, m01, m02, m10, m11, m12 } throws NullPointerException if matrix is null throws ArrayIndexOutOfBoundsException if matrix is too small

  5. new AffineTransformation()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): Any

    Clones this transformation

    Clones this transformation

    return a copy of this transformation

    Definition Classes
    AffineTransformation → AnyRef
  6. def compose(trans: AffineTransformation): AffineTransformation

    Updates this transformation to be the composition of this transformation with the given {link AffineTransformation}.

    Updates this transformation to be the composition of this transformation with the given {link AffineTransformation}. This produces a transformation whose effect is equal to applying this transformation followed by the argument transformation. Mathematically,

    A.compose(B) = TB x TA
    

    trans

    an affine transformation return this transformation, with an updated matrix

  7. def composeBefore(trans: AffineTransformation): AffineTransformation

    Updates this transformation to be the composition of a given {link AffineTransformation} with this transformation.

    Updates this transformation to be the composition of a given {link AffineTransformation} with this transformation. This produces a transformation whose effect is equal to applying the argument transformation followed by this transformation. Mathematically,

    A.composeBefore(B) = TA x TB
    

    trans

    an affine transformation return this transformation, with an updated matrix

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(obj: Any): Boolean

    Tests if an object is an AffineTransformation and has the same matrix as this transformation.

    Tests if an object is an AffineTransformation and has the same matrix as this transformation.

    obj

    an object to test return true if the given object is equal to this object

    Definition Classes
    AffineTransformation → AnyRef → Any
  10. def filter(seq: CoordinateSequence, i: Int): Unit

    Transforms the i'th coordinate in the input sequence

    Transforms the i'th coordinate in the input sequence

    seq

    a CoordinateSequence

    i

    the index of the coordinate to transform

    Definition Classes
    AffineTransformationCoordinateSequenceFilter
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def getDeterminant: Double

    Computes the determinant of the transformation matrix.

    Computes the determinant of the transformation matrix. The determinant is computed as:

    | m00 m01 m02 |
    | m10 m11 m12 | = m00 * m11 - m01 * m10
    |  0   0   1  |
    
    If the determinant is zero, the transform is singular (not invertible), and operations which attempt to compute an inverse will throw a NoninvertibleTransformException.

    return the determinant of the transformation

    See also

    #getInverse()

  14. def getInverse: AffineTransformation

    Computes the inverse of this transformation, if one exists.

    Computes the inverse of this transformation, if one exists. The inverse is the transformation which when composed with this one produces the identity transformation. A transformation has an inverse if and only if it is not singular (i.e. its determinant is non-zero). Geometrically, an transformation is non-invertible if it maps the plane to a line or a point. If no inverse exists this method will throw a NoninvertibleTransformationException.

    The matrix of the inverse is equal to the inverse of the matrix for the transformation. It is computed as follows:

    1
    inverse(A)  =  ---   x  adjoint(A)
    det
    
    
    =   1       |  m11  -m01   m01*m12-m02*m11  |
    ---   x  | -m10   m00  -m00*m12+m10*m02  |
    det      |  0     0     m00*m11-m10*m01  |
    
    
    
    = |  m11/det  -m01/det   m01*m12-m02*m11/det |
    | -m10/det   m00/det  -m00*m12+m10*m02/det |
    |   0           0          1               |
    
    

    return a new inverse transformation throws NoninvertibleTransformationException

    Annotations
    @throws(scala.this.throws.<init>$default$1[org.locationtech.jts.geom.util.NoninvertibleTransformationException])
    See also

    #getDeterminant()

  15. def getMatrixEntries: Array[Double]

    Gets an array containing the entries of the transformation matrix.

    Gets an array containing the entries of the transformation matrix. Only the 6 non-trivial entries are returned, in the sequence:

    m00, m01, m02, m10, m11, m12
    

    return an array of length 6

  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def isDone: Boolean

    Reports that this filter should continue to be executed until all coordinates have been transformed.

    Reports that this filter should continue to be executed until all coordinates have been transformed.

    return false

    Definition Classes
    AffineTransformationCoordinateSequenceFilter
  18. def isGeometryChanged: Boolean
  19. def isIdentity: Boolean

    Tests if this transformation is the identity transformation.

    Tests if this transformation is the identity transformation.

    return true if this is the identity transformation

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. def reflect(x: Double, y: Double): AffineTransformation

    Updates the value of this transformation to that of a reflection transformation composed with the current value.

    Updates the value of this transformation to that of a reflection transformation composed with the current value.

    x

    the x-ordinate of the line to reflect around

    y

    the y-ordinate of the line to reflect around return this transformation, with an updated matrix

  25. def reflect(x0: Double, y0: Double, x1: Double, y1: Double): AffineTransformation

    Updates the value of this transformation to that of a reflection transformation composed with the current value.

    Updates the value of this transformation to that of a reflection transformation composed with the current value.

    x0

    the x-ordinate of a point on the line to reflect around

    y0

    the y-ordinate of a point on the line to reflect around

    x1

    the x-ordinate of a point on the line to reflect around

    y1

    the y-ordinate of a point on the line to reflect around return this transformation, with an updated matrix

  26. def rotate(sinTheta: Double, cosTheta: Double, x: Double, y: Double): AffineTransformation

    Updates the value of this transformation to that of a rotation around a given point composed with the current value, with the sin and cos of the rotation angle specified directly.

    Updates the value of this transformation to that of a rotation around a given point composed with the current value, with the sin and cos of the rotation angle specified directly.

    sinTheta

    the sine of the angle to rotate by

    cosTheta

    the cosine of the angle to rotate by

    x

    the x-ordinate of the rotation point

    y

    the y-ordinate of the rotation point return this transformation, with an updated matrix

  27. def rotate(theta: Double, x: Double, y: Double): AffineTransformation

    Updates the value of this transformation to that of a rotation around a given point composed with the current value.

    Updates the value of this transformation to that of a rotation around a given point composed with the current value. Positive angles correspond to a rotation in the counter-clockwise direction.

    theta

    the angle to rotate by, in radians

    x

    the x-ordinate of the rotation point

    y

    the y-ordinate of the rotation point return this transformation, with an updated matrix

  28. def rotate(sinTheta: Double, cosTheta: Double): AffineTransformation

    Updates the value of this transformation to that of a rotation around the origin composed with the current value, with the sin and cos of the rotation angle specified directly.

    Updates the value of this transformation to that of a rotation around the origin composed with the current value, with the sin and cos of the rotation angle specified directly.

    sinTheta

    the sine of the angle to rotate by

    cosTheta

    the cosine of the angle to rotate by return this transformation, with an updated matrix

  29. def rotate(theta: Double): AffineTransformation

    Updates the value of this transformation to that of a rotation transformation composed with the current value.

    Updates the value of this transformation to that of a rotation transformation composed with the current value. Positive angles correspond to a rotation in the counter-clockwise direction.

    theta

    the angle to rotate by, in radians return this transformation, with an updated matrix

  30. def scale(xScale: Double, yScale: Double): AffineTransformation

    Updates the value of this transformation to that of a scale transformation composed with the current value.

    Updates the value of this transformation to that of a scale transformation composed with the current value.

    xScale

    the value to scale by in the x direction

    yScale

    the value to scale by in the y direction return this transformation, with an updated matrix

  31. def setToIdentity: AffineTransformation

    Sets this transformation to be the identity transformation.

    Sets this transformation to be the identity transformation. The identity transformation has the matrix:

    | 1 0 0 |
    | 0 1 0 |
    | 0 0 1 |
    

    return this transformation, with an updated matrix

  32. def setToReflection(x: Double, y: Double): AffineTransformation

    Sets this transformation to be a reflection about the line defined by vector (x,y).

    Sets this transformation to be a reflection about the line defined by vector (x,y). The transformation for a reflection is computed by:

    d = sqrt(x2 + y2)
    sin = y / d;
    cos = x / d;
    
    Tref = Trot(sin, cos) x Tscale(1, -1) x Trot(-sin, cos)
    

    x

    the x-component of the reflection line vector

    y

    the y-component of the reflection line vector return this transformation, with an updated matrix

  33. def setToReflection(x0: Double, y0: Double, x1: Double, y1: Double): AffineTransformation

    Sets this transformation to be a reflection about the line defined by a line (x0,y0) - (x1,y1).

    Sets this transformation to be a reflection about the line defined by a line (x0,y0) - (x1,y1).

    x0

    the X ordinate of one point on the reflection line

    y0

    the Y ordinate of one point on the reflection line

    x1

    the X ordinate of another point on the reflection line

    y1

    the Y ordinate of another point on the reflection line return this transformation, with an updated matrix

  34. def setToReflectionBasic(x0: Double, y0: Double, x1: Double, y1: Double): AffineTransformation

    Explicitly computes the math for a reflection.

    Explicitly computes the math for a reflection. May not work.

    x0

    the X ordinate of one point on the reflection line

    y0

    the Y ordinate of one point on the reflection line

    x1

    the X ordinate of another point on the reflection line

    y1

    the Y ordinate of another point on the reflection line return this transformation, with an updated matrix

  35. def setToRotation(sinTheta: Double, cosTheta: Double, x: Double, y: Double): AffineTransformation

    Sets this transformation to be a rotation around a given point (x,y) by specifying the sin and cos of the rotation angle directly.

    Sets this transformation to be a rotation around a given point (x,y) by specifying the sin and cos of the rotation angle directly. The transformation matrix for the rotation has the value:

    |  cosTheta  -sinTheta   x-x*cos+y*sin |
    |  sinTheta   cosTheta   y-x*sin-y*cos |
    |         0          0         1       |
    

    sinTheta

    the sine of the rotation angle

    cosTheta

    the cosine of the rotation angle

    x

    the x-ordinate of the rotation point

    y

    the y-ordinate of the rotation point return this transformation, with an updated matrix

  36. def setToRotation(theta: Double, x: Double, y: Double): AffineTransformation

    Sets this transformation to be a rotation around a given point (x,y).

    Sets this transformation to be a rotation around a given point (x,y). A positive rotation angle corresponds to a counter-clockwise rotation. The transformation matrix for a rotation by an angle theta has the value:

    |  cosTheta  -sinTheta   x-x*cos+y*sin |
    |  sinTheta   cosTheta   y-x*sin-y*cos |
    |           0            0   1 |
    

    theta

    the rotation angle, in radians

    x

    the x-ordinate of the rotation point

    y

    the y-ordinate of the rotation point return this transformation, with an updated matrix

  37. def setToRotation(sinTheta: Double, cosTheta: Double): AffineTransformation

    Sets this transformation to be a rotation around the origin by specifying the sin and cos of the rotation angle directly.

    Sets this transformation to be a rotation around the origin by specifying the sin and cos of the rotation angle directly. The transformation matrix for the rotation has the value:

    |  cosTheta  -sinTheta   0 |
    |  sinTheta   cosTheta   0 |
    |         0          0   1 |
    

    sinTheta

    the sine of the rotation angle

    cosTheta

    the cosine of the rotation angle return this transformation, with an updated matrix

  38. def setToRotation(theta: Double): AffineTransformation

    Sets this transformation to be a rotation around the origin.

    Sets this transformation to be a rotation around the origin. A positive rotation angle corresponds to a counter-clockwise rotation. The transformation matrix for a rotation by an angle theta has the value:

    |  cos(theta)  -sin(theta)   0 |
    |  sin(theta)   cos(theta)   0 |
    |           0            0   1 |
    

    theta

    the rotation angle, in radians return this transformation, with an updated matrix

  39. def setToScale(xScale: Double, yScale: Double): AffineTransformation

    Sets this transformation to be a scaling.

    Sets this transformation to be a scaling. The transformation matrix for a scale has the value:

    |  xScale      0  dx |
    |  1      yScale  dy |
    |  0           0   1 |
    

    xScale

    the amount to scale x-ordinates by

    yScale

    the amount to scale y-ordinates by return this transformation, with an updated matrix

  40. def setToShear(xShear: Double, yShear: Double): AffineTransformation

    Sets this transformation to be a shear.

    Sets this transformation to be a shear. The transformation matrix for a shear has the value:

    |  1      xShear  0 |
    |  yShear      1  0 |
    |  0           0  1 |
    
    Note that a shear of (1, 1) is not equal to shear(1, 0) composed with shear(0, 1). Instead, shear(1, 1) corresponds to a mapping onto the line x = y.

    xShear

    the x component to shear by

    yShear

    the y component to shear by return this transformation, with an updated matrix

  41. def setToTranslation(dx: Double, dy: Double): AffineTransformation

    Sets this transformation to be a translation.

    Sets this transformation to be a translation. For a translation by the vector (x, y) the transformation matrix has the value:

    |  1  0  dx |
    |  1  0  dy |
    |  0  0   1 |
    

    dx

    the x component to translate by

    dy

    the y component to translate by return this transformation, with an updated matrix

  42. def setTransformation(trans: AffineTransformation): AffineTransformation

    Sets this transformation to be a copy of the given one

    Sets this transformation to be a copy of the given one

    trans

    a transformation to copy return this transformation, with an updated matrix

  43. def setTransformation(m00: Double, m01: Double, m02: Double, m10: Double, m11: Double, m12: Double): AffineTransformation

    Sets this transformation's matrix to have the given values.

    Sets this transformation's matrix to have the given values.

    m00

    the entry for the [0, 0] element in the transformation matrix

    m01

    the entry for the [0, 1] element in the transformation matrix

    m02

    the entry for the [0, 2] element in the transformation matrix

    m10

    the entry for the [1, 0] element in the transformation matrix

    m11

    the entry for the [1, 1] element in the transformation matrix

    m12

    the entry for the [1, 2] element in the transformation matrix return this transformation, with an updated matrix

  44. def shear(xShear: Double, yShear: Double): AffineTransformation

    Updates the value of this transformation to that of a shear transformation composed with the current value.

    Updates the value of this transformation to that of a shear transformation composed with the current value.

    xShear

    the value to shear by in the x direction

    yShear

    the value to shear by in the y direction return this transformation, with an updated matrix

  45. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  46. def toString(): String

    Gets a text representation of this transformation.

    Gets a text representation of this transformation. The string is of the form:

    AffineTransformation[[m00, m01, m02], [m10, m11, m12]]
    

    return a string representing this transformation

    Definition Classes
    AffineTransformation → AnyRef → Any
  47. def transform(seq: CoordinateSequence, i: Int): Unit

    Applies this transformation to the i'th coordinate in the given CoordinateSequence.

    Applies this transformation to the i'th coordinate in the given CoordinateSequence.

    seq

    a CoordinateSequence

    i

    the index of the coordinate to transform

  48. def transform(g: Geometry): Geometry

    Creates a new {link Geometry} which is the result of this transformation applied to the input Geometry.

    Creates a new {link Geometry} which is the result of this transformation applied to the input Geometry.

    g

    a Geometry return a transformed Geometry

  49. def transform(src: Coordinate, dest: Coordinate): Coordinate

    Applies this transformation to the src coordinate and places the results in the dest coordinate (which may be the same as the source).

    Applies this transformation to the src coordinate and places the results in the dest coordinate (which may be the same as the source).

    src

    the coordinate to transform

    dest

    the coordinate to accept the results return the dest coordinate

  50. def translate(x: Double, y: Double): AffineTransformation

    Updates the value of this transformation to that of a translation transformation composed with the current value.

    Updates the value of this transformation to that of a translation transformation composed with the current value.

    x

    the value to translate by in the x direction

    y

    the value to translate by in the y direction return this transformation, with an updated matrix

  51. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  52. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  53. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Cloneable

Inherited from AnyRef

Inherited from Any

Ungrouped