Matrix API/it: Difference between revisions

From FreeCAD Documentation
(Created page with "=API di Matrici= In tutto FreeCAD le matrici 4x4 sono utilizzati ovunque e possono essere create con una delle seguenti modalità: m=FreeCAD.Matrix() # m = the [htt...")
 
(Updating to match new version of source page)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
=API di Matrici=
{{VeryImportantMessage|(Ottobre 2019) Non modificare queste pagine. Le informazioni sono incomplete e obsolete. Per l'API più recente, consultare la [https://www.freecadweb.org/api documentazione API autogenerata] o generare la documentazione autonomamente. Vedere [[Source documentation/it|Documentazione del codice sorgente]].}}
In tutto FreeCAD le matrici 4x4 sono utilizzati ovunque e possono essere create con una delle seguenti modalità:


In FreeCAD le matrici 4x4 sono utilizzate ovunque e possono essere create con una delle seguenti modalità:
m=FreeCAD.Matrix() # m = the [http://en.wikipedia.org/wiki/Identity_matrix identity matrix]
{{Code|code=
m=FreeCAD.Base.Matrix()
m = FreeCAD.Matrix() # m = the [http://en.wikipedia.org/wiki/Identity_matrix identity matrix]
print m.A21() # print m[1][0]
m = FreeCAD.Base.Matrix()
print m.A21() # print m[1][0]
}}


{{APIFunction|A| | |all the matrix elements.}}

{{APIFunction|A11| | |a matrix element.}}

{{APIFunction|A12| | |a matrix element.}}

{{APIFunction|A13| | |a matrix element.}}

{{APIFunction|A14| | |a matrix element.}}

{{APIFunction|A21| | |a matrix element.}}

{{APIFunction|A22| | |a matrix element.}}

{{APIFunction|A23| | |a matrix element.}}

{{APIFunction|A24| | |a matrix element.}}

{{APIFunction|A31| | |a matrix element.}}

{{APIFunction|A32| | |a matrix element.}}

{{APIFunction|A33| | |a matrix element.}}

{{APIFunction|A34| | |a matrix element.}}

{{APIFunction|A41| | |a matrix element.}}

{{APIFunction|A42| | |a matrix element.}}

{{APIFunction|A43| | |a matrix element.}}

{{APIFunction|A44| | |a matrix element.}}

{{APIFunction|determinant| |Computes the [http://en.wikipedia.org/wiki/Determinant determinant] of the matrix|a number.}}

{{APIFunction|inverse| |[http://en.wikipedia.org/wiki/Inverse_matrix Inverts] this matrix, if possible|nothing.}}

{{APIFunction|invert| |Returns the [http://en.wikipedia.org/wiki/Inverse_matrix inverse] of this matrix, if possible|a Matrix}}


{{APIFunction|A| | |tutti gli elementi della matrice.}}
{{APIFunction|A11| | |un elemento della matrice.}}
{{APIFunction|A12| | |un elemento della matrice.}}
{{APIFunction|A13| | |un elemento della matrice.}}
{{APIFunction|A14| | |un elemento della matrice.}}
{{APIFunction|A21| | |un elemento della matrice.}}
{{APIFunction|A22| | |un elemento della matrice.}}
{{APIFunction|A23| | |un elemento della matrice.}}
{{APIFunction|A24| | |un elemento della matrice.}}
{{APIFunction|A31| | |un elemento della matrice.}}
{{APIFunction|A32| | |un elemento della matrice.}}
{{APIFunction|A33| | |un elemento della matrice.}}
{{APIFunction|A34| | |un elemento della matrice.}}
{{APIFunction|A41| | |un elemento della matrice.}}
{{APIFunction|A42| | |un elemento della matrice.}}
{{APIFunction|A43| | |un elemento della matrice.}}
{{APIFunction|A44| | |un elemento della matrice.}}
{{APIFunction|determinant| |Calcola il [http://en.wikipedia.org/wiki/Determinant determinante] della matrice|un numero.}}
{{APIFunction|inverse| |[http://en.wikipedia.org/wiki/Inverse_matrix Inverte] questa matrice, se è possibile|nulla.}}
{{APIFunction|invert| |Restituisce [http://en.wikipedia.org/wiki/Inverse_matrix la matrice inversa] di questa matrice, se possibile|una Matrice}}
{{APIFunction|move|Vector|Makes this matrix a [http://en.wikipedia.org/wiki/Translation_%28geometry%29 translation] matrix|nothing.}}
{{APIFunction|move|Vector|Makes this matrix a [http://en.wikipedia.org/wiki/Translation_%28geometry%29 translation] matrix|nothing.}}

{{APIFunction|multiply|Matrix or Vector|Returns the [http://en.wikipedia.org/wiki/Cross_product cross product] of a matrix or vector with this matrix|a Matrix}}
{{APIFunction|multiply|Matrix or Vector|Returns the [http://en.wikipedia.org/wiki/Cross_product cross product] of a matrix or vector with this matrix|a Matrix}}

{{APIFunction|rotateX|Float(radians)|Makes this matrix a [http://en.wikipedia.org/wiki/Rotation_%28mathematics%29 rotation] about X transform|nothing.}}
{{APIFunction|rotateX|Float(radians)|Makes this matrix a [http://en.wikipedia.org/wiki/Rotation_%28mathematics%29 rotation] about X transform|nothing.}}

{{APIFunction|rotateY|Float(radians)|Makes this matrix a [http://en.wikipedia.org/wiki/Rotation_%28mathematics%29 rotation] about Y transform|nothing.}}
{{APIFunction|rotateY|Float(radians)|Makes this matrix a [http://en.wikipedia.org/wiki/Rotation_%28mathematics%29 rotation] about Y transform|nothing.}}

{{APIFunction|rotateZ|Float(radians)|Makes this matrix a [http://en.wikipedia.org/wiki/Rotation_%28mathematics%29 rotation] about Z transform|nothing.}}
{{APIFunction|rotateZ|Float(radians)|Makes this matrix a [http://en.wikipedia.org/wiki/Rotation_%28mathematics%29 rotation] about Z transform|nothing.}}

{{APIFunction|scale|Vector|Makes this matrix a [http://en.wikipedia.org/wiki/Scaling_matrix scaling transform]|nothing.}}
{{APIFunction|scale|Vector|Makes this matrix a [http://en.wikipedia.org/wiki/Scaling_matrix scaling transform]|nothing.}}

{{APIFunction|transform|Vector, Matrix|Makes this matrix a [http://en.wikipedia.org/wiki/Transformation_matrix transformation matrix] based on Vector and Matrix|nothing. }}
{{APIFunction|transform|Vector, Matrix|Makes this matrix a [http://en.wikipedia.org/wiki/Transformation_matrix transformation matrix] based on Vector and Matrix|nothing. }}

{{APIFunction|unity| |Makes this matrix the [http://en.wikipedia.org/wiki/Identity_matrix identity matrix]|nothing.}}
{{APIFunction|unity| |Makes this matrix the [http://en.wikipedia.org/wiki/Identity_matrix identity matrix]|nothing.}}


{{Userdocnavi{{#translation:}}}}
{{languages/it | {{en|Matrix_API}} {{es|Matrix_API/es}} }}
[[Category:API{{#translation:}}]]

[[Category:API/it]]
[[Category:Poweruser Documentation{{#translation:}}]]
{{clear}}

Latest revision as of 21:01, 27 February 2020

Other languages:
(Ottobre 2019) Non modificare queste pagine. Le informazioni sono incomplete e obsolete. Per l'API più recente, consultare la documentazione API autogenerata o generare la documentazione autonomamente. Vedere Documentazione del codice sorgente.

In FreeCAD le matrici 4x4 sono utilizzate ovunque e possono essere create con una delle seguenti modalità:

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]


A( )

Description:

Returns: tutti gli elementi della matrice.

A11( )

Description:

Returns: un elemento della matrice.

A12( )

Description:

Returns: un elemento della matrice.

A13( )

Description:

Returns: un elemento della matrice.

A14( )

Description:

Returns: un elemento della matrice.

A21( )

Description:

Returns: un elemento della matrice.

A22( )

Description:

Returns: un elemento della matrice.

A23( )

Description:

Returns: un elemento della matrice.

A24( )

Description:

Returns: un elemento della matrice.

A31( )

Description:

Returns: un elemento della matrice.

A32( )

Description:

Returns: un elemento della matrice.

A33( )

Description:

Returns: un elemento della matrice.

A34( )

Description:

Returns: un elemento della matrice.

A41( )

Description:

Returns: un elemento della matrice.

A42( )

Description:

Returns: un elemento della matrice.

A43( )

Description:

Returns: un elemento della matrice.

A44( )

Description:

Returns: un elemento della matrice.

determinant( )

Description: Calcola il determinante della matrice

Returns: un numero.

inverse( )

Description: Inverte questa matrice, se è possibile

Returns: nulla.

invert( )

Description: Restituisce la matrice inversa di questa matrice, se possibile

Returns: una Matrice

move(Vector)

Description: Makes this matrix a translation matrix

Returns: nothing.

multiply(Matrix or Vector)

Description: Returns the cross product of a matrix or vector with this matrix

Returns: a Matrix

rotateX(Float(radians))

Description: Makes this matrix a rotation about X transform

Returns: nothing.

rotateY(Float(radians))

Description: Makes this matrix a rotation about Y transform

Returns: nothing.

rotateZ(Float(radians))

Description: Makes this matrix a rotation about Z transform

Returns: nothing.

scale(Vector)

Description: Makes this matrix a scaling transform

Returns: nothing.

transform(Vector, Matrix)

Description: Makes this matrix a transformation matrix based on Vector and Matrix

Returns: nothing.

unity( )

Description: Makes this matrix the identity matrix

Returns: nothing.