Term
Maya API Naming conventions |
|
Definition
M - Wrapper Object
MFn - Function Set
MIt - Iterator
MPx - Proxy Object |
|
|
Term
Know what the DAG is and what it contains |
|
Definition
Directed Acyclic Graph
Transforms
Meshes
Lights
Cameras |
|
|
Term
Be familiar with the iterators used in lab |
|
Definition
MItDag dagIt(MItDag::kDepthFirst, MFn::kMesh)
for(; !dagIt.isDone(); dagIt.next())
{
MDagPath currPath;
dagIt.getPath(currPath);
MFnMesh currMesh(currPath);
If(currMesh.isIntermediateObject)
continue;
Export(currMesh);
}
|
|
|
Term
|
Definition
string
float
vector (three floats)
int
bool
enum
|
|
|
Term
know what a unique vertex list is |
|
Definition
A list of verts without duplicates that is indexed into by a triangle list |
|
|
Term
|
Definition
Used to get our selected meshes (transforms actually) from maya
MGlobal::getActiveSelectionList(MSelectionList & list);
MSelectionList::length(); |
|
|
Term
|
Definition
Allows us to access custom attributes from maya |
|
|
Term
Know the export algorithm: How to iterate
|
|
Definition
MItMeshPolygn polyIter(currMesh.dagPath());
for(; !polyIter.isDone(); polyIter.next()){} |
|
|
Term
How to get information from the mesh |
|
Definition
currMesh.getPoints(pointsArray) – gets all the positions
currMesh.getNormals(normalsArray) – gets all normals
currMesh.getUVs(uArray, vArray) – gets all Us and Vs |
|
|
Term
How to build a unique vertex list
|
|
Definition
// Fill out a temp triangle too. For(int I = 0; I < 3; ++i) { Unsigned int vertIndex = polyIter.vertexIndex(i);
Unsigned int normalIndex = polyIter.normalIndex(i); Int uvIndex; polyIter.getUVIndex(I, uvIndex); Ed2Vert vTestVertex; // Fill out vertex info using your indeces to index into arrays // Loop through your unique list and compare vTestVertex // If vTestVertex is unique, push it into the list of unique verts. // Fill out each vert of the temp triangle } // push back out temp triangle into out outmesh’s triList |
|
|