IC Python API:RLPy RMatrix3
Contents
- 1 Detailed Description
- 2 Operators
- 3 Member Functions
- 3.1 AccuScale
- 3.2 Adjoint
- 3.3 AdjointTranspose
- 3.4 Determinant
- 3.5 E
- 3.6 FromAxisAngle
- 3.7 FromEulerAngle
- 3.8 FromSpereUnitVec
- 3.9 GetColumn
- 3.10 GetRow
- 3.11 InfNorm
- 3.12 Inverse
- 3.13 InverseTranspose
- 3.14 IsRightHandCoordinate
- 3.15 M
- 3.16 MakeIdentity
- 3.17 MaxColumn
- 3.18 MaxRow
- 3.19 OneNorm
- 3.20 RotationX
- 3.21 RotationY
- 3.22 RotationZ
- 3.23 TimesTranspose
- 3.24 ToEulerAngle
- 3.25 Transpose
- 3.26 TransposeTimes
- Main article: Modules.
Detailed Description
This class represent the 3x3 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
AccuScale
RLPy.RMatrix3.AccuScale ( self, rkScale )
Accumulate matrix with scale vector.
Parameters
rkScale [IN] Scale vector - RLPy.RVector3
Returns
Adjoint
RLPy.RMatrix3.Adjoint ( self )
Inverse times determinant.
Returns
AdjointTranspose
RLPy.RMatrix3.AdjointTranspose ( self )
Transpose of inverse times determinant.
Returns
Determinant
RLPy.RMatrix3.Determinant ( self )
The matrix's determinant.
Returns
E
RLPy.RMatrix3.E ( self, args )
Get the matrix element for the specified index(0~8).
Parameters
nRow [IN] Index of the matrix.
Returns
FromAxisAngle
RLPy.RMatrix3.FromAxisAngle ( self, rkAxis, fAngle )
Rotation matrix from axis angle.
Parameters
rkAxis [IN] axis vector - RLPy.RVector3
fAngle [IN] angle in radians - float
Returns
FromEulerAngle
RLPy.RMatrix3.FromEulerAngle ( 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
FromSpereUnitVec
RLPy.RMatrix3.FromSpereUnitVec ( self, rkVec )
Rotation matrix from sphere unit vector.
Parameters
rkVec [IN] vector - RLPy.RVector3
Returns
GetColumn
RLPy.RMatrix3.GetColumn ( self, nCol )
Get the matrix element for the specified column.
Parameters
nRow [IN] Index of the column in the matrix.
Returns
GetRow
RLPy.RMatrix3.GetRow ( self, nRow )
Get the matrix element for the specified row.
Parameters
nRow [IN] Index of the row in the matrix - int
Returns
InfNorm
RLPy.RMatrix3.InfNorm ( self )
InfNorm of the matrix.
Returns
Inverse
RLPy.RMatrix3.Inverse ( self )
Inverse of the matrix.
Returns
InverseTranspose
RLPy.RMatrix3.InverseTranspose ( self )
Transpose of inverse.
Returns
IsRightHandCoordinate
RLPy.RMatrix3.IsRightHandCoordinate ( self )
Determine the coordinate is right hand or left hand.
Return Values
true Right hand coordinate
true Left hand coordinate
M
RLPy.RMatrix3.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.RMatrix3.MakeIdentity ( self )
Sets the matrix to the identity.
Returns
MaxColumn
RLPy.RMatrix3.MaxColumn ( self )
Get maximum value of the column index in the matrix.
Returns
MaxRow
RLPy.RMatrix3.MaxRow ( self )
Get maximum value of the row index in the matrix.
Returns
OneNorm
RLPy.RMatrix3.OneNorm ( self )
Norm of the matrix.
Returns
RotationX
RLPy.RMatrix3.RotationX ( self, fAngle )
Rotation matrix for rotations around x-axis.
Parameters
fAngle [IN] angle in radians - float
Returns
RotationY
RLPy.RMatrix3.RotationY ( self, fAngle )
Rotation matrix for rotations around y-axis.
Parameters
fAngle [IN] angle in radians - float
Returns
RotationZ
RLPy.RMatrix3.RotationZ ( self, fAngle )
Rotation matrix for rotations around z-axis.
Parameters
fAngle [IN] angle in radians - float
Returns
TimesTranspose
RLPy.RMatrix3.TimesTranspose ( self, mM )
Multiplies of the transpose of the matrix.
Parameters
mM [IN] the matrix - RLPy.RMatrix3
Returns
ToEulerAngle
RLPy.RMatrix3.ToEulerAngle ( self, Oreder, rx, ry, rz )
Convert matrix to Euler angle.
Parameters
Oreder [IN] Euler order - RLPy.Rotation_Order
rx [OUT] return angle of x-axis in radians - float
ry [OUT] return angle of y-axis in radians - float
rz [OUT] return angle of z-axis in radians - float
Transpose
RLPy.RMatrix3.Transpose ( self )
Transpose of the matrix.
Returns
TransposeTimes
RLPy.RMatrix3.TransposeTimes ( self, mM )
Multiplies of the transpose of the matrix.
Parameters
mM [IN] the matrix - RLPy.RMatrix3