tbaypaul
02-24-2006, 12:11 AM
I am having an attack of anal rententiveness. The swirlDeformer2 from Dave Gould's 1st book Maya Programming uses two different parameter names in it's deform method syntax. I am being neurotic about the MMatrix ref parameter name. Is it named mat or is it localToWorld? And then the DataHandle uses the mat name again! Plus it is a virtual method so it really only exists in the derived class. UGH! IT is the only thing I don't get in the example! It compiles and operates fine and drives me mad!
//prototype in header file
virtual MStatus deform( MDataBlock &block,
MItGeometry &iter,
const MMatrix &mat,
unsigned int multiIndex );
// actual defination
MStatus SwirlDeformer::deform( MDataBlock& block, MItGeometry &iter,
const MMatrix &localToWorld,
unsigned int geomIndex )
{
.....
MDataHandle matData = block.inputValue( deformSpace );
MMatrix mat = matData.asMatrix();
MMatrix invMat = mat.inverse();
.....
}
//prototype in header file
virtual MStatus deform( MDataBlock &block,
MItGeometry &iter,
const MMatrix &mat,
unsigned int multiIndex );
// actual defination
MStatus SwirlDeformer::deform( MDataBlock& block, MItGeometry &iter,
const MMatrix &localToWorld,
unsigned int geomIndex )
{
.....
MDataHandle matData = block.inputValue( deformSpace );
MMatrix mat = matData.asMatrix();
MMatrix invMat = mat.inverse();
.....
}
