|
Uranium
Application Framework
|
Public Member Functions | |
| def | __init__ |
| def | __deepcopy__ (self, memo) |
| def | copy (self) |
| def | __eq__ |
| def | at |
| def | setRow |
| def | setColumn |
| def | multiply |
| def | preMultiply |
| def | getData (self) |
| def | setToIdentity (self) |
| def | invert (self) |
| def | pseudoinvert (self) |
| def | getInverse (self) |
| def | getTransposed (self) |
| def | transpose (self) |
| def | translate |
| def | setByTranslation |
| def | setTranslation |
| def | getTranslation (self) |
| def | rotateByAxis |
| def | setByRotationAxis |
| def | compose |
| def | getEuler |
| def | setByEuler |
| def | scaleByFactor |
| def | setByScaleFactor |
| def | setByScaleVector |
| def | getScale (self) |
| def | setOrtho |
| def | setPerspective |
| def | decompose (self) |
| def | __repr__ (self) |
Static Public Member Functions | |
| def | fromPositionOrientationScale |
This class is a 4x4 homogeneous matrix wrapper around numpy. Heavily based (in most cases a straight copy with some refactoring) on the excellent 'library' Transformations.py created by Christoph Gohlke.
| def UM.Math.Matrix.Matrix.decompose | ( | self, | |
| Tuple, | |||
| Vector, | |||
| Matrix, | |||
| Vector, | |||
| Vector | |||
| ) |
SOURCE: https://github.com/matthew-brett/transforms3d/blob/e402e56686648d9a88aa048068333b41daa69d1a/transforms3d/affines.py
Decompose 4x4 homogenous affine matrix into parts.
The parts are translations, rotations, zooms, shears.
This is the same as :func:`decompose` but specialized for 4x4 affines.
Decomposes `A44` into ``T, R, Z, S``, such that::
Smat = np.array([[1, S[0], S[1]],
[0, 1, S[2]],
[0, 0, 1]])
RZS = np.dot(R, np.dot(np.diag(Z), Smat))
A44 = np.eye(4)
A44[:3,:3] = RZS
A44[:-1,-1] = T
The order of transformations is therefore shears, followed by
zooms, followed by rotations, followed by translations.
This routine only works for shape (4,4) matrices
Parameters
----------
A44 : array shape (4,4)
Returns
-------
T : array, shape (3,)
Translation vector
R : array shape (3,3)
rotation matrix
Z : array, shape (3,)
Zoom vector. May have one negative zoom to prevent need for negative
determinant R matrix above
S : array, shape (3,)
Shear vector, such that shears fill upper triangle above
diagonal to form shear matrix (type ``striu``).
| def UM.Math.Matrix.Matrix.getData | ( | self, | |
| numpy, | |||
| ndarray | |||
| ) |
Get raw data. :returns: 4x4 numpy array
| def UM.Math.Matrix.Matrix.getInverse | ( | self, | |
| Matrix | |||
| ) |
Return a inverted copy of the matrix. :returns: The invertex matrix.
| def UM.Math.Matrix.Matrix.getTransposed | ( | self, | |
| Matrix | |||
| ) |
Return the transpose of the matrix.
| def UM.Math.Matrix.Matrix.invert | ( | self, | |
| None | |||
| ) |
Invert the matrix
| def UM.Math.Matrix.Matrix.pseudoinvert | ( | self, | |
| None | |||
| ) |
Invert the matrix in-place with a pseudoinverse. The pseudoinverse is guaranteed to succeed, but if the matrix was singular is not a true inverse. Just something that approaches the inverse.
| def UM.Math.Matrix.Matrix.setToIdentity | ( | self, | |
| None | |||
| ) |
Create a 4x4 identity matrix. This overwrites any existing data.