Jeep Wang
03-14-2004, 05:39 AM
I'm studying the maya api's example"torusField".there are three questions:
1. Questions on Mplug.I know Mplug is a tree structure,but i don't know it's use,when and where to define Mplug's structure.I found that in the "compute()" of "torusField",
////
if( !(plug == mOutputForce) )
return( MS::kUnknownParameter );
////
I know mOutputForce is a member of the MPxFieldNode,it is a fixed structure?
2. In "void torusField::ownerPosition()",
///
Descriptions:
If this field has an owner....
///
I can't understand the "owner",because of my poor English ,I use "cout<<" to print the owner's position,it always be (0,0,0).
3. Questions on "logicalIndex()",the returned integer is what.If there is a plug tree "plug1",
//////
plug1{1,2,3,{a,b,c},4,{a,b,{x,y,z}},5};
int num=plug1.logicalIndex();
/////////
What the "num" is?
You may only answer one of the questions.Thanks for any help!
1. Questions on Mplug.I know Mplug is a tree structure,but i don't know it's use,when and where to define Mplug's structure.I found that in the "compute()" of "torusField",
////
if( !(plug == mOutputForce) )
return( MS::kUnknownParameter );
////
I know mOutputForce is a member of the MPxFieldNode,it is a fixed structure?
2. In "void torusField::ownerPosition()",
///
Descriptions:
If this field has an owner....
///
I can't understand the "owner",because of my poor English ,I use "cout<<" to print the owner's position,it always be (0,0,0).
3. Questions on "logicalIndex()",the returned integer is what.If there is a plug tree "plug1",
//////
plug1{1,2,3,{a,b,c},4,{a,b,{x,y,z}},5};
int num=plug1.logicalIndex();
/////////
What the "num" is?
You may only answer one of the questions.Thanks for any help!
