Affine
Inherits from: Transform
Overview
The Affine class represents an affine transform. An affine transform performs a linear mapping from 2D/3D coordinates to other 2D/3D coordinates while preserving the "straightness" and "parallelness" of lines. Affine transformations can be constructed using sequences rotations, translations, scales, and shears.
Note: application developers should not normally use this class directly, but instead use the specific Translate, Scale, Rotate, or Shear transforms instead.
Such a coordinate transformation can be represented by a 3 row by 4 column matrix. This matrix transforms source coordinates (x,y,z) into destination coordinates (x',y',z') by considering them to be a column vector and multiplying the coordinate vector by the matrix according to the following process:
[ x'] [ mxx mxy mxz tx ] [ x ] [ mxx * x + mxy * y + mxz * z + tx ]
[ y'] = [ myx myy myz ty ] [ y ] = [ myx * x + myy * y + myz * z + ty ]
[ z'] [ mzx mzy mzz tz ] [ z ] [ mzx * x + mzy * y + mzz * z + tz ]
[ 1 ]
Profile: common
Variable Summary
| name | type | Default Value | description |
|---|---|---|---|
| mxx | Number | 1.0 |
Defines the X coordinate scaling element of the 3x4 matrix. |
| mxy | Number | 0.0 |
Defines the X coordinate shearing element of the 3x4 matrix. |
| mxz | Number | 0.0 |
Defines the XZ element of the 3x4 matrix. |
| tx | Number | 0.0 |
Defines the X coordinate translation element of the 3x4 matrix. |
| myx | Number | 0.0 |
Defines the Y coordinate shearing element of the 3x4 matrix. |
| myy | Number | 1.0 |
Defines the Y coordinate scaling element of the 3x4 matrix. |
| myz | Number | 0.0 |
Defines the YZ element of the 3x4 matrix. |
| ty | Number | 0.0 |
Defines the Y coordinate translation element of the 3x4 matrix. |
| mzx | Number | 0.0 |
Defines the ZX element of the 3x4 matrix. |
| mzy | Number | 0.0 |
Defines the ZY element of the 3x4 matrix. |
| mzz | Number | 1.0 |
Defines the Z coordinate scaling element of the 3x4 matrix. |
| tz | Number | 0.0 |
Defines the Z coordinate translation element of the 3x4 matrix. |
