Transformation formalism for PyPO. More...
Functions | |
| def | PyPO.MatTransform.MatRotate (theta, matAppend=None, pivot=None, radians=False) |
| Generate a 3D rotation matrix and append to previous matrix. More... | |
| def | PyPO.MatTransform.MatTranslate (trans, matAppend=None) |
| Generate a 3D translation matrix and append to previous matrix. More... | |
| def | PyPO.MatTransform.InvertMat (mat) |
| Invert a transformation matrix, both the rotational and translational part. More... | |
Transformation formalism for PyPO.
This script contains the methods for applying matrix transformations to objects.
| def PyPO.MatTransform.InvertMat | ( | mat | ) |
Invert a transformation matrix, both the rotational and translational part.
| mat | Full 4D affine transformation matrix. |
| def PyPO.MatTransform.MatRotate | ( | theta, | |
matAppend = None, |
|||
pivot = None, |
|||
radians = False |
|||
| ) |
Generate a 3D rotation matrix and append to previous matrix.
The appending is done by right matrix multiplication of the old transformation matrix with the rotation matrix.
| theta | Numpy array of length 3 containing the xyz rotation angles. |
| matAppend | The previous matrix. Defaults to identity matrix. |
| pivot | Pivot for the rotation. Defaults to origin. |
| radians | Whether theta is in radians or degrees. Defaults to False (degrees). |
| def PyPO.MatTransform.MatTranslate | ( | trans, | |
matAppend = None |
|||
| ) |
Generate a 3D translation matrix and append to previous matrix.
The appending is done by right matrix multiplication of the old transformation matrix with the translation matrix.
| trans | Numpy array of length 3 containing the xyz translations, in mm. |
| matAppend | The previous matrix. Defaults to identity matrix. |