I3DMatrix¶
- class I3DMatrix¶
Bases:
ImpactCOMWrapperBase- Summary:
Represents a 3D transformation matrix.
- Remarks:
A 3D matrix can be used to define the orientation (position, rotation, scaling and mirroring) of a 3D instance, and also to apply a trasnformation to a 3D instance. Use i3_d_creator.matrix3_d to create a 3D matrix object. A 3D matrix has with 4 rows and 4 columns, containing the following elements: XX XY XZ XW YX YY YZ YW ZX ZY ZZ ZW WX WY WZ WW Transformation matrices can be built up by combinining simple transformations (see the Translate, Scale, Roate and Multiply methods), so normally there is no need to be concerned with the individual elements of the matrix. Introduced in Impact 12.0.0.136
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property ww¶
Gets WW.
- Summary:
Element (4,4) of the matrix. This is the value in the fourth row, fourth column.
- Returns:
The value of WW.
- Return type:
ww (float)
- property wx¶
Gets WX.
- Summary:
Element (4,1) of the matrix. This is the value in the fourth row, first column.
- Returns:
The value of WX.
- Return type:
wx (float)
- property wy¶
Gets WY.
- Summary:
Element (4,2) of the matrix. This is the value in the fourth row, second column.
- Returns:
The value of WY.
- Return type:
wy (float)
- property wz¶
Gets WZ.
- Summary:
Element (4,3) of the matrix. This is the value in the fourth row, third column.
- Returns:
The value of WZ.
- Return type:
wz (float)
- property xw¶
Gets XW.
- Summary:
Element (1,4) of the matrix. This is the value in the first row, fourth column.
- Returns:
The value of XW.
- Return type:
xw (float)
- property xx¶
Gets XX.
- Summary:
Element (1,1) of the matrix. This is the value in the first row, first column.
- Returns:
The value of XX.
- Return type:
xx (float)
- property xy¶
Gets XY.
- Summary:
Element (1,2) of the matrix. This is the value in the first row, second column.
- Returns:
The value of XY.
- Return type:
xy (float)
- property xz¶
Gets XZ.
- Summary:
Element (1,3) of the matrix. This is the value in the first row, third column.
- Returns:
The value of XZ.
- Return type:
xz (float)
- property yw¶
Gets YW.
- Summary:
Element (2,4) of the matrix. This is the value in the second row, fourth column.
- Returns:
The value of YW.
- Return type:
yw (float)
- property yx¶
Gets YX.
- Summary:
Element (2,1) of the matrix. This is the value in the second row, first column.
- Returns:
The value of YX.
- Return type:
yx (float)
- property yy¶
Gets YY.
- Summary:
Element (2,2) of the matrix. This is the value in the second row, second column.
- Returns:
The value of YY.
- Return type:
yy (float)
- property yz¶
Gets YZ.
- Summary:
Element (2,3) of the matrix. This is the value in the second row, third column.
- Returns:
The value of YZ.
- Return type:
yz (float)
- property zw¶
Gets ZW.
- Summary:
Element (3,4) of the matrix. This is the value in the third row, fourth column.
- Returns:
The value of ZW.
- Return type:
zw (float)
- property zx¶
Gets ZX.
- Summary:
Element (3,1) of the matrix. This is the value in the third row, first column.
- Returns:
The value of ZX.
- Return type:
zx (float)
- property zy¶
Gets ZY.
- Summary:
Element (3,2) of the matrix. This is the value in the third row, second column.
- Returns:
The value of ZY.
- Return type:
zy (float)
- property zz¶
Gets ZZ.
- Summary:
Element (3,3) of the matrix. This is the value in the third row, third column.
- Returns:
The value of ZZ.
- Return type:
zz (float)
- assign(matrix)¶
- Summary:
Assigns the properties of another i3_d_matrix object to this object.
- Parameters:
matrix (i3_d_matrix) – Specifies the i3_d_matrix object from which to copy the properties.
- identity()¶
- Summary:
Sets the matrix to be the identity (unit) matrix.
- Remarks:
The transformation represented by an identity matrix is that which is neutral, and has no effect.
Examples:
- inverse()¶
- Summary:
Inverts the 3D matrix.
- Remarks:
The inverse is such that any matrix multiplied by its inverse is equal to the identity matrix. The transformation represented by the inverse matrix is that which has an opposite effect to the original matrix.
Examples:
- isNone()¶
Checks if the COM object is None. This is useful for determining if the wrapper has been initialized with a valid COM object.
- multiply(matrix)¶
- Summary:
Multiplies the 3D matrix by another.
- Parameters:
matrix (i3_d_matrix) – The matrix by which to muliply this matrix.
Examples:
- rotate(vector, angle)¶
- Summary:
Adds a rotation transformation (about the origin) to the matrix.
- Parameters:
vector (i3_d_vector) – The axis of rotation, passing through the origin.
angle (float) – The rotation angle to be applied.
Examples:
- scale(vector)¶
- Summary:
Adds a scaling transformation (about the origin) to the matrix.
- Parameters:
vector (i3_d_vector) – A vector containing the X, Y and Z scale factors.
Examples:
- to_string()¶
- Summary:
Returns a string representation of the 3D matrix.
Examples:
- translate(vector)¶
- Summary:
Adds a translation (shift) transformation to the matrix.
- Parameters:
vector (i3_d_vector) – The vector representing the shift, the amount to move in the X, Y and Z directions.
Examples: