#include <MMatrix.h>
This class provides access to Maya's internal matrix math library allowing matrices to be handled easily, and in a manner compatible with internal Maya data structures.
All methods that query the matrix are threadsafe, all methods that modify the matrix are not threadsafe.
apiMeshShape.cpp, apiMeshShape.h, apiMeshShapeUI.cpp, apiSimpleShapeUI.cpp, cgfxAttrDef.cpp, cgfxAttrDef.h, cgfxShaderNode.cpp, cgfxVector.cpp, closestPointCmd.cpp, closestPointOnNurbsSurfaceCmd.cpp, cvColorNode.cpp, D3DViewportRenderer.cpp, D3DViewportRenderer.h, dagPoseInfoCmd.cpp, GLSLShaderNode.cpp, hlslShader.cpp, hwAnisotropicShader_NV20.cpp, hwReflectBumpShader_NV20.cpp, hwReflectBumpShader_NV20.h, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, instancerListCmd.cpp, intersectOnNurbsSurfaceCmd.cpp, offsetNode.cpp, OpenGLViewportRenderer.cpp, ownerEmitter.cpp, rockingTransform.cpp, rockingTransform.h, sampleCmd.cpp, sampleParticles.cpp, simpleEmitter.cpp, simpleFluidEmitter.cpp, simpleFluidEmitter.h, squareScaleManipContext.cpp, surfaceTwist.cpp, surfaceTwistCmd.cpp, sweptEmitter.cpp, torusField.cpp, and yTwistNode.cpp.
Public Member Functions | |
MMatrix () | |
MMatrix (const MMatrix &src) | |
MMatrix (const double m[4][4]) | |
MMatrix (const float m[4][4]) | |
~MMatrix () | |
MMatrix & | operator= (const MMatrix &) |
double | operator() (unsigned int row, unsigned int col) const |
const double * | operator[] (unsigned int row) const |
MStatus | get (double dest[4][4]) const |
MStatus | get (float dest[4][4]) const |
MMatrix | transpose () const |
MMatrix & | setToIdentity () |
MMatrix & | setToProduct (const MMatrix &left, const MMatrix &right) |
MMatrix & | operator+= (const MMatrix &right) |
MMatrix | operator+ (const MMatrix &right) const |
MMatrix & | operator-= (const MMatrix &right) |
MMatrix | operator- (const MMatrix &right) const |
MMatrix & | operator*= (const MMatrix &right) |
MMatrix | operator* (const MMatrix &right) const |
MMatrix & | operator*= (double) |
MMatrix | operator* (double) const |
bool | operator== (const MMatrix &other) const |
bool | operator!= (const MMatrix &other) const |
MMatrix | inverse () const |
MMatrix | adjoint () const |
MMatrix | homogenize () const |
double | det4x4 () const |
double | det3x3 () const |
bool | isEquivalent (const MMatrix &other, double tolerance=1.0e-10) const |
bool | isSingular () const |
double & | operator() (unsigned int row, unsigned int col) |
NO SCRIPT SUPPORT. | |
double * | operator[] (unsigned int row) |
NO SCRIPT SUPPORT. | |
Public Attributes | |
double | matrix [4][4] |
the matrix data | |
Friends | |
OPENMAYA_EXPORT MMatrix | operator* (double, const MMatrix &right) |
NO SCRIPT SUPPORT. | |
OPENMAYA_EXPORT std::ostream & | operator<< (std::ostream &os, const MMatrix &m) |
NO SCRIPT SUPPORT. |
MMatrix::MMatrix | ( | ) |
The default contstructor. The instance is initialized to the 4x4 identity matrix.
MMatrix::MMatrix | ( | const MMatrix & | src | ) |
The copy Constructor.
[in] | src | the instance to copy data from |
MMatrix::MMatrix | ( | const double | src_matrix[4][4] | ) |
Initialize the instance with a 4x4 matrix of doubles
[in] | src_matrix | a 4x4 matrix of doubles |
MMatrix::MMatrix | ( | const float | src_matrix[4][4] | ) |
Initialize the instance with a 4x4 matrix of floats
[in] | src_matrix | a 4x4 matrix of floats |
MMatrix::~MMatrix | ( | ) |
The class destructor.
double MMatrix::operator() | ( | unsigned int | row, | |
unsigned int | col | |||
) | const [inline] |
Index operator. Given row and column indices, it will return the value at the specified location in the matrix.
[in] | row | index of the row to access |
[in] | col | index of the column to access |
const double * MMatrix::operator[] | ( | unsigned int | row | ) | const [inline] |
Index operator. Returns an entire row of the matrix as an array of doubles.
[in] | row | index of the row to access |
MStatus MMatrix::get | ( | double | dest[4][4] | ) | const |
Fill a 4x4 matrix of doubles with the elements from the instance.
[out] | dest | the 4x4 matrix of doubles to populate |
MStatus MMatrix::get | ( | float | dest[4][4] | ) | const |
Fill a 4x4 matrix of floats with the elements from the instance.
[out] | dest | the 4x4 matrix of floats to populate |
MMatrix MMatrix::transpose | ( | ) | const |
Compute and return the transpose of this instance.
MMatrix & MMatrix::setToIdentity | ( | ) |
Set this instance to the inner product of the two argument matrices.
[in] | left | the left hand matrix for the operation |
[in] | right | the right hand matrix for the operation |
The in place matrix multiplication operator.
MMatrix & MMatrix::operator*= | ( | double | factor | ) |
The in place matrix multiply by a scalar operator.
MMatrix MMatrix::operator* | ( | double | factor | ) | const |
The matrix multiply by a scalar operator.
bool MMatrix::operator== | ( | const MMatrix & | other | ) | const |
The matrix equality operator. The matrices must be identical.
bool MMatrix::operator!= | ( | const MMatrix & | other | ) | const |
The matrix inequality operator.
MMatrix MMatrix::inverse | ( | ) | const |
Compute and return the inverse of this instance.
MMatrix MMatrix::adjoint | ( | ) | const |
Compute and return the adjoint of this instance.
MMatrix MMatrix::homogenize | ( | ) | const |
Compute and return a homogenized version of this instance.
double MMatrix::det4x4 | ( | ) | const |
Compute and return the determinant of this instance
double MMatrix::det3x3 | ( | ) | const |
Compute and return the determinant of the upper left 3x3 submatrix of this instance
bool MMatrix::isEquivalent | ( | const MMatrix & | other, | |
double | tolerance = 1.0e-10 | |||
) | const |
Determine if the given matrix is equivalent to this instance within the specified tolerance.
[in] | other | the matrix to compare to |
[in] | tolerance | the tolerance to use during the comparison |
bool MMatrix::isSingular | ( | ) | const |
Determines if the given matrix is singular.
double & MMatrix::operator() | ( | unsigned int | row, | |
unsigned int | col | |||
) | [inline] |
NO SCRIPT SUPPORT.
Index operator. Given row and column indices, it will return the value at the specified location in the matrix.
[in] | row | index of the row to access |
[in] | col | index of the column to access |
double * MMatrix::operator[] | ( | unsigned int | row | ) | [inline] |
NO SCRIPT SUPPORT.
Index operator. Returns an entire row of the matrix as an array of doubles.
[in] | row | index of the row to access |
NO SCRIPT SUPPORT.
The multiplication operator that allows the scalar value to preceed the matrix.
OPENMAYA_EXPORT std::ostream& operator<< | ( | std::ostream & | os, | |
const MMatrix & | m | |||
) | [friend] |
NO SCRIPT SUPPORT.
Print the contents of the given MMatrix on the given ostream. The format used is [[r11, r12, r13, r14] [r21, r22, r23, r24] [r31, r32, r33, r34] [r41, r42, r43, r44]].
[in] | os | the ostream to print to |
[in] | m | the MMatrix whose value is to be printed |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |