AutoOpenMatrix Module
When Euclid is opened this module will be auto-opened. It only contains extension members for type Matrix.
Type extensions
| Type extension |
Description
|
Full Usage:
this.Decompose
Parameters:
unit
Returns: MatrixDecomposition
The decomposition. d.ToMatrix recomposes the matrix.
|
Decomposes this affine Matrix into translation, rotation, scale and shear. Applied to a point in this order, they give the same transformation as the matrix: first scale, then shear, then rotate and last translate. Fails if the matrix is projecting, or if it is singular, that is if a scale factor is less than 1e-12.
Extended Type:
|
|
Interpolates from this matrix to finish for animations, by decomposing both into translation, rotation, scale and shear and interpolating these. The translation, scale and shear are interpolated linearly. The rotation is interpolated with Quaternion.slerp along the shortest rotation, at a constant angular speed. Factor 0 returns this matrix and factor 1 returns finish. The factor is not clamped: negative factors and factors above one extrapolate. If only one of the matrices is mirroring, the interpolated matrix collapses on the way, when its X scale passes zero. Fails if the factor is not finite, or if this matrix or finish is projecting or singular.
Extended Type:
|
Full Usage:
this.TryDecompose
Parameters:
unit
Returns: MatrixDecomposition voption
ValueSome decomposition, or ValueNone for a projecting or singular matrix.
|
Tries to decompose this affine Matrix into translation, rotation, scale and shear. Applied to a point in this order, they give the same transformation as the matrix: first scale, then shear, then rotate and last translate. Returns ValueNone if the matrix is projecting, or if it is singular, that is if a scale factor is less than 1e-12.
Extended Type:
|
Full Usage:
Matrix.createFromDecomposition d
Parameters:
MatrixDecomposition
-
The decomposition to recompose.
Returns: Matrix
A new affine Matrix.
|
Recomposes a Matrix from its translation, rotation, scale and shear. Same as d.ToMatrix.
Extended Type:
|
|
Create 4x4 matrix from 3x3 rigid matrix. The last column is set to (0,0,0,1).
Extended Type:
|
Full Usage:
Matrix.decompose m
Parameters:
Matrix
-
The matrix to decompose.
Returns: MatrixDecomposition
The decomposition. d.ToMatrix recomposes the matrix.
|
Decomposes an affine Matrix into translation, rotation, scale and shear. Applied to a point in this order, they give the same transformation as the matrix: first scale, then shear, then rotate and last translate. The shear is upper triangular, so the X-axis is never sheared. For a mirroring matrix the scale along the X-axis is negative. Fails if the matrix is projecting, or if it is singular, that is if a scale factor is less than 1e-12.
Extended Type:
|
|
Interpolates from start to finish for animations, by decomposing both into translation, rotation, scale and shear and interpolating these. The translation, scale and shear are interpolated linearly. The rotation is interpolated with Quaternion.slerp along the shortest rotation, at a constant angular speed. Unlike an interpolation of the 16 matrix elements, this keeps a rotation rigid and does not shrink it on the way. Factor 0 returns start and factor 1 returns finish. The factor is not clamped: negative factors and factors above one extrapolate. If only one of the matrices is mirroring, the interpolated matrix collapses on the way, when its X scale passes zero. Fails if the factor is not finite, or if start or finish is projecting or singular.
Extended Type:
|
Full Usage:
Matrix.tryDecompose m
Parameters:
Matrix
-
The matrix to decompose.
Returns: MatrixDecomposition voption
ValueSome decomposition, or ValueNone for a projecting or singular matrix.
|
Tries to decompose an affine Matrix into translation, rotation, scale and shear. Applied to a point in this order, they give the same transformation as the matrix: first scale, then shear, then rotate and last translate. The shear is upper triangular, so the X-axis is never sheared. For a mirroring matrix the scale along the X-axis is negative. Returns ValueNone if the matrix is projecting, or if it is singular, that is if a scale factor is less than 1e-12.
Extended Type:
|
Euclid