OpenMaya.MFloatMatrix Class Reference

OpenMaya.MFloatMatrix Class Reference

Class Description

4x4 matrix with single-precision elements.

Constructors

SignatureParametersDescription
MFloatMatrix()  

Default constructor. Returns a new matrix set to the identity matrix.

MFloatMatrix(src) src - MFloatMatrix

Copy constructor. Returns a new matrix with the same value as src.

MFloatMatrix(values) values - sequence of 16 Float values or four tuples of four Float values each.

Returns a new matrix whose elements are set to those given by values. Values are interpreted in row order, so the first four values make up the first row of the matrix, the second four values the second row of the matrix, and so on.

Sequence Support

An MFloatMatrix object is treated like a list of 16 float values, in row major order. Assignment is supported.

len() returns 16.

Deletion, concatenation, repetition and slicing are not supported.

Number Support

OperationResult
MFloatMatrix + MFloatMatrix

Returns a new matrix which is the sum of the two matrices.

MFloatMatrix += MFloatMatrix

Adds the second matrix to the first and returns a new reference to the first.

MFloatMatrix - MFloatMatrix

Returns a new matrix which is the result of subtracting the second matrix from the first.

MFloatMatrix -= MFloatMatrix

Subtracts the second matrix from the first and returns a new reference to the first.

MFloatMatrix * MFloatMatrix

Returns a new matrix which is the product of the two matrices.

MFloatMatrix *= MFloatMatrix

Multiplies the first matrix by the second and returns a new reference to the first.

MFloatMatrix * Float

Returns a new matrix in which all of the elements of the given matrix have been multiplied by the given Float.

Float * MFloatMatrix

Returns a new matrix in which all of the elements of the given matrix have been multiplied by the given Float.

MFloatMatrix *= Float

Multiplies all the elements of the matrix by the Float and returns a new reference to the matrix.

Comparison Support

MFloatMatrix == MFloatMatrix Exact equality test. True if each of the 16 elements of the first matrix is exactly equal to the corresponding element in the second matrix. No tolerance is applied.
MFloatMatrix != MFloatMatrix Exact inequality test. True if any of the 16 elements in the first matrix is not exactly equal to the corresponding element in the second matrix. No tolerance is applied.

All other comparison operators will raise a TypeError exception.

 


+ Inheritance diagram for OpenMaya.MFloatMatrix:

Public Member Functions

__add__ ()
 
__delitem__ ()
 
__eq__ ()
 
__ge__ ()
 
__getitem__ ()
 
__gt__ ()
 
__iadd__ ()
 
__imul__ ()
 
__init__ ()
 
__isub__ ()
 
__le__ ()
 
__len__ ()
 
__lt__ ()
 
__mul__ ()
 
__ne__ ()
 
__radd__ ()
 
__repr__ ()
 
__rmul__ ()
 
__rsub__ ()
 
__setitem__ ()
 
__str__ ()
 
__sub__ ()
 
adjoint ()
 
det3x3 ()
 
det4x4 ()
 
getElement ()
 
homogenize ()
 
inverse ()
 
isEquivalent ()
 
setElement ()
 
setToIdentity ()
 
setToProduct ()
 
transpose ()
 

Static Public Attributes

float kTolerance = 9.999999747378752e-06
 

Constructor & Destructor Documentation

OpenMaya.MFloatMatrix.__init__ ( )
x.__init__(...) initializes x; see help(type(x)) for signature

Member Function Documentation

OpenMaya.MFloatMatrix.__add__ ( )
x.__add__(y) <==> x+y
OpenMaya.MFloatMatrix.__delitem__ ( )
x.__delitem__(y) <==> del x[y]
OpenMaya.MFloatMatrix.__eq__ ( )
x.__eq__(y) <==> x==y
OpenMaya.MFloatMatrix.__ge__ ( )
x.__ge__(y) <==> x>=y
OpenMaya.MFloatMatrix.__getitem__ ( )
x.__getitem__(y) <==> x[y]
OpenMaya.MFloatMatrix.__gt__ ( )
x.__gt__(y) <==> x>y
OpenMaya.MFloatMatrix.__iadd__ ( )
x.__iadd__(y) <==> x+=y
OpenMaya.MFloatMatrix.__imul__ ( )
x.__imul__(y) <==> x*=y
OpenMaya.MFloatMatrix.__isub__ ( )
x.__isub__(y) <==> x-=y
OpenMaya.MFloatMatrix.__le__ ( )
x.__le__(y) <==> x<=y
OpenMaya.MFloatMatrix.__len__ ( )
x.__len__() <==> len(x)
OpenMaya.MFloatMatrix.__lt__ ( )
x.__lt__(y) <==> x<y
OpenMaya.MFloatMatrix.__mul__ ( )
x.__mul__(y) <==> x*y
OpenMaya.MFloatMatrix.__ne__ ( )
x.__ne__(y) <==> x!=y
OpenMaya.MFloatMatrix.__radd__ ( )
x.__radd__(y) <==> y+x
OpenMaya.MFloatMatrix.__repr__ ( )
x.__repr__() <==> repr(x)
OpenMaya.MFloatMatrix.__rmul__ ( )
x.__rmul__(y) <==> y*x
OpenMaya.MFloatMatrix.__rsub__ ( )
x.__rsub__(y) <==> y-x
OpenMaya.MFloatMatrix.__setitem__ ( )
x.__setitem__(i, y) <==> x[i]=y
OpenMaya.MFloatMatrix.__str__ ( )
x.__str__() <==> str(x)
OpenMaya.MFloatMatrix.__sub__ ( )
x.__sub__(y) <==> x-y
OpenMaya.MFloatMatrix.adjoint ( )
Returns a new matrix containing this matrix's adjoint.
Signature: adjoint()
Parameters:  
Returns: MFloatMatrix
Description: Returns a new matrix containing this matrix's adjoint.
OpenMaya.MFloatMatrix.det3x3 ( )
Returns the determinant of the 3x3 matrix formed by the first 3 elements of the first 3 rows of this matrix.
Signature: det3x3()
Parameters:  
Returns: Float
Description: Returns the determinant of the 3x3 matrix formed by the first 3 elements of the first 3 rows of this matrix.
OpenMaya.MFloatMatrix.det4x4 ( )
Returns this matrix's determinant.
Signature: det4x4()
Parameters:  
Returns: Float
Description: Returns this matrix's determinant.
OpenMaya.MFloatMatrix.getElement ( )
Returns the matrix element for the specified row and column.
Signature: getElement(row,col)
Parameters: row - Int
col - Int
Returns: Float
Description: Returns the matrix element specified by row and col. For retrieving single elements this is faster than indexing into the matrix as a sequence because it does not require the creation of an entire row tuple simply to retrieve one element from that row.
OpenMaya.MFloatMatrix.homogenize ( )
Returns a new matrix containing the homogenized version of this matrix.
Signature: homogenize()
Parameters:  
Returns: MFloatMatrix
Description: Returns a new matrix containing the homogenized version of this matrix.
OpenMaya.MFloatMatrix.inverse ( )
Returns a new matrix containing this matrix's inverse.
Signature: inverse()
Parameters:  
Returns: MFloatMatrix
Description: Returns a new matrix containing this matrix's nverse.
OpenMaya.MFloatMatrix.isEquivalent ( )
Test for equivalence of two matrices, within a tolerance.
Signature: isEquivalent(other, tolerance=kTolerance)
Parameters: other - MFloatMatrix
tol - Float
Returns: Bool
Description: Inexact equality test. Returns True if each element of this matrix is within tolerance of the corresponding element of other.
OpenMaya.MFloatMatrix.setElement ( )
Sets the matrix element for the specified row and column.
Signature: setElement(row,col,value)
Parameters: row - Int
col - Int
value - Float
Returns: New reference to self.
Description: Set the matrix element specified by row and col to the given value.
OpenMaya.MFloatMatrix.setToIdentity ( )
Sets this matrix to the identity.
Signature: setToIdentity()
Parameters:  
Returns: New reference to self.
Description: Sets this matrix to the identity.
OpenMaya.MFloatMatrix.setToProduct ( )
Sets this matrix to the product of the two matrices passed in.
Signature: setToProduct(left, right)
Parameters: left - MFloatMatrix
right - MFloatMatrix
Returns: New reference to self.
Description: Sets this matrix to the product of left and right.
OpenMaya.MFloatMatrix.transpose ( )
Returns a new matrix containing this matrix's transpose.
Signature: transpose()
Parameters:  
Returns: MFloatMatrix
Description: Returns a new matrix containing this matrix's transpose.

Member Data Documentation

OpenMaya.MFloatMatrix.kTolerance = 9.999999747378752e-06
static
Name: kTolerance
Type: Float
Description: Default tolerance for non-exact equality tests.