Can some one explain how the Vertex Color Works in the sdk ?, I have looked at the help but there is no much information about it in there, And I have looked at the samples but I’m trying to understand how does it work.
For example The code below is from the utility AVCMode.cpp
The mesh.vertCol is self explanatory but what I don’t understand is the mesh.vcFace part, Do we need them ?, Is it always the same order as the mesh faces ?
Appreciate any information.
Guillermo Leal
int numVCVerts = mesh.numFaces*3;
mesh.setNumVCFaces(mesh.numFaces);
mesh.setNumVertCol(numVCVerts);int faceVert = 0;
for (int i=0; i<mesh.numFaces; i++) {
for (int j=0; j<3; j++) {
mesh.vertCol[faceVert] = i<faceColors.Count() ?
Point3(faceColors[i]->colors[j].r, faceColors[i]->colors[j].g, faceColors[i]->colors[j].b) :
Point3(1.0f, 1.0f, 1.0f);
faceVert++;
}
}faceVert = 0;
for (int i=0; i<mesh.numFaces; i++) {
mesh.vcFace[i].t[0] = faceVert++;
mesh.vcFace[i].t[1] = faceVert++;
mesh.vcFace[i].t[2] = faceVert++;
}
