IC Python API:RLPy RMatrix4
Contents
- 1 Detailed Description
- 2 Operators
- 3 Member Functions
- 3.1 AccuRotate
- 3.2 AccuScale
- 3.3 AccuTranslate
- 3.4 Adjoint
- 3.5 AdjointTranspose
- 3.6 Determinant
- 3.7 E
- 3.8 FromEulerAngle
- 3.9 GetColumn
- 3.10 GetRow
- 3.11 GetSR
- 3.12 GetTranslate
- 3.13 InfNorm
- 3.14 Inverse
- 3.15 InverseTranspose
- 3.16 M
- 3.17 MakeIdentity
- 3.18 MaxColumn
- 3.19 MaxRow
- 3.20 OneNorm
- 3.21 RotateAxisAngle
- 3.22 RotationX
- 3.23 RotationY
- 3.24 RotationZ
- 3.25 SetSR
- 3.26 SetTranslate
- 3.27 TimesTranspose
- 3.28 Transpose
- 3.29 TransposeTimes
- Main article: Modules.
Detailed Description
This class represent the 4x4 matrix.
Operators
This class supports the following operators:
Member | Operation | Syntax | Description | Example |
---|---|---|---|---|
__add__ | Addition | a + b | Adds values on either side of the operator. | a + b = 30 |
__sub__ | Subtraction | a - b | Subtracts right hand operand from left hand operand. | a – b = -10 |
__mul__ | Multiplication | a * b | Multiplies values on either side of the operator. | a * b = 200 |
__truediv__ | Division | a / b | Divides left hand operand by right hand operand. | b / a = 2 |
__neg__ | Negation | -a | Return the value negated. | a = -b |
__eq__ | Equality | a == b | If the values of two operands are equal, then the condition becomes true. | (a == b) is not true. |
__ne__ | Difference | a != b | If values of two operands are not equal, then condition becomes true. | (a != b) is true. |
__gt__ | Greater Than | a > b | If the value of left operand is greater than the value of right operand, then condition becomes true. | (a > b) is not true. |
__lt__ | Less Than | a < b | If the value of left operand is less than the value of right operand, then condition becomes true. | (a < b) is true. |
__ge__ | Greater Than or Equal | a >= b | If the value of left operand is greater than or equal to the value of right operand, then condition becomes true. | (a >= b) is not true. |
__le__ | Less or Equal | a <= b | If the value of left operand is less than or equal to the value of right operand, then condition becomes true. | (a <= b) is true. |
__iadd__ | Addition (Inplace) | a += b | It adds right operand to the left operand and assign the result to left operand. | c += a is equivalent to c = c + a |
__isub__ | Subtraction (Inplace) | a -= b | It subtracts right operand from the left operand and assign the result to left operand. | c -= a is equivalent to c = c - a |
__imul__ | Multiply (Inplace) | a *= b | It multiplies right operand with the left operand and assign the result to left operand. | c *= a is equivalent to c = c * a |
__itruediv__ | Divide (Inplace) | a /= b | It divides left operand with the right operand and assign the result to left operand. | c /= a is equivalent to c = c / ac /= a is equivalent to c = c / a |
Member Functions
AccuRotate
RLPy.RMatrix4.AccuRotate ( self, rkRotate )
Accumulate matrix with rotation matrix.
Parameters
rkRotate [IN] Rotation matrix - RLPy.RMatrix3
Returns
AccuScale
RLPy.RMatrix4.AccuScale ( self, rkScale )
Accumulate matrix with scale vector.
Parameters
rkScale [IN] Scale vector - RLPy.RVector3
Returns
AccuTranslate
RLPy.RMatrix4.AccuTranslate ( self, rkTranslate )
Accumulate matrix with translate vector.
Parameters
rkTranslate [IN] Translate vector - RLPy.RVector3
Returns
Adjoint
RLPy.RMatrix4.Adjoint ( self )
Inverse times determinant.
Returns
AdjointTranspose
RLPy.RMatrix4.AdjointTranspose ( self )
Transpose of inverse times determinant.
Returns
Determinant
RLPy.RMatrix4.Determinant ( self )
The matrix's determinant.
Returns
E
RLPy.RMatrix4.E ( self, args )
Get the matrix element for the specified index(0~15).
Parameters
nRow [IN] Index of the matrix.
Returns
FromEulerAngle
RLPy.RMatrix4.FromEulerAngle ( self, Oreder, rx, ry, rz )
Rotation matrix from Euler angle.
Parameters
Oreder [IN] Euler order - RLPy.Rotation_Order
rx [IN] Angle of x-axis in radians - float
ry [IN] Angle of y-axis in radians - float
rz [IN] Angle of z-axis in radians - float
Returns
GetColumn
RLPy.RMatrix4.GetColumn ( self, nC )
Get the matrix element for the specified column.
Parameters
nRow [IN] Index of the column in the matrix.
Returns
GetRow
RLPy.RMatrix4.GetRow ( self, nR )
Get the matrix element for the specified row.
Parameters
nRow [IN] Index of the row in the matrix.
Returns
GetSR
RLPy.RMatrix4.GetSR ( self )
Get scale and rotation part of the matrix.
Returns
GetTranslate
RLPy.RMatrix4.GetTranslate ( self )
Get translate of the matrix.
Returns
InfNorm
RLPy.RMatrix4.InfNorm ( self )
InfNorm of the matrix.
Returns
Inverse
RLPy.RMatrix4.Inverse ( self )
Inverse of the matrix.
Returns
InverseTranspose
RLPy.RMatrix4.InverseTranspose ( self )
Transpose of inverse.
Returns
M
RLPy.RMatrix4.M ( self, args )
Get the matrix element for the specified row and column.
Parameters
nRow [IN] Index of the row in the matrix - int
nCol [IN] Index of the column in the matrix - int
Returns
MakeIdentity
RLPy.RMatrix4.MakeIdentity ( self )
Sets the matrix to the identity.
Returns
MaxColumn
RLPy.RMatrix4.MaxColumn ( self )
Get maximum value of the column index in the matrix.
Returns
MaxRow
RLPy.RMatrix4.MaxRow ( self )
Get maximum value of the row index in the matrix.
Returns
OneNorm
RLPy.RMatrix4.OneNorm ( self )
Norm of the matrix.
Returns
RotateAxisAngle
RLPy.RMatrix4.RotateAxisAngle ( self, rkAxis, fAngle )
Rotation matrix from axis angle.
Parameters
rkAxis [IN] axis vector - RLPy.RVector3
fAngle [IN] angle in radians - float
Returns
RotationX
RLPy.RMatrix4.RotationX ( self, fAngle )
Rotation matrix for rotations around x-axis.
Parameters
fAngle [IN] angle in radians - float
Returns
RotationY
RLPy.RMatrix4.RotationY ( self, fAngle )
Rotation matrix for rotations around y-axis.
Parameters
fAngle [IN] angle in radians - float
Returns
RotationZ
RLPy.RMatrix4.RotationZ ( self, fAngle )
Rotation matrix for rotations around z-axis.
Parameters
fAngle [IN] angle in radians - float
Returns
SetSR
RLPy.RMatrix4.SetSR ( self, mSR )
Set scale and rotation part of the matrix.
Parameters
mSR [IN] 3x3 matrix - RLPy.RMatrix3
Returns
SetTranslate
RLPy.RMatrix4.SetTranslate ( self, vTranslate )
Set translate of the matrix.
Parameters
vTranslate [IN] Translate vector - RLPy.RVector3
Returns
TimesTranspose
RLPy.RMatrix4.TimesTranspose ( self, mM )
Multiplies of the transpose of the matrix.
Parameters
mM [IN] the matrix - RLPy.RMatrix4
Returns
Transpose
RLPy.RMatrix4.Transpose ( self )
Transpose of the matrix.
Returns
TransposeTimes
RLPy.RMatrix4.TransposeTimes ( self, mM )
Multiplies of the transpose of the matrix.
Parameters
mM [IN] the matrix - RLPy.RMatrix4