Matrix API/en: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{VeryImportantMessage|(November 2018) This information may be incomplete and outdated. For the latest API, see the [https://www.freecadweb.org/api autogenerated API documentation].}} |
|||
4x4 Matrixes are used everywhere throughout FreeCAD and can be created by one of the following manners: |
4x4 Matrixes are used everywhere throughout FreeCAD and can be created by one of the following manners: |
||
{{Code|code= |
{{Code|code= |
||
m=FreeCAD.Matrix() # m = the [http://en.wikipedia.org/wiki/Identity_matrix identity matrix] |
m = FreeCAD.Matrix() # m = the [http://en.wikipedia.org/wiki/Identity_matrix identity matrix] |
||
m=FreeCAD.Base.Matrix() |
m = FreeCAD.Base.Matrix() |
||
print m.A21() # print m[1][0] |
print m.A21() # print m[1][0] |
||
}} |
}} |
Revision as of 09:41, 27 February 2019
4x4 Matrixes are used everywhere throughout FreeCAD and can be created by one of the following manners:
m = FreeCAD.Matrix() # m = the [http://en.wikipedia.org/wiki/Identity_matrix identity matrix]
m = FreeCAD.Base.Matrix()
print m.A21() # print m[1][0]
Description: Computes the determinant of the matrix
Returns: a number.
Description: Inverts this matrix, if possible
Returns: nothing.
Description: Returns the inverse of this matrix, if possible
Returns: a Matrix
Description: Makes this matrix a translation matrix
Returns: nothing.
Description: Returns the cross product of a matrix or vector with this matrix
Returns: a Matrix
Description: Makes this matrix a rotation about X transform
Returns: nothing.
Description: Makes this matrix a rotation about Y transform
Returns: nothing.
Description: Makes this matrix a rotation about Z transform
Returns: nothing.
Description: Makes this matrix a scaling transform
Returns: nothing.
Description: Makes this matrix a transformation matrix based on Vector and Matrix
Returns: nothing.
Description: Makes this matrix the identity matrix
Returns: nothing.