The following function has been used to recover ground-truth info on the cropped partial model mesh2 by aligning it to the complete model mesh1 from which ground-truth info is transferred to the partial model;

So, result is ground-truth ids for all part-model vertices.

void Mesh::recoverGroundTruth(Mesh* mesh2)
{
	//recovers ground-truth info on the cropped partial model mesh2 by aligning it to the full model mesh1 from which ground-truth info is transferred to the partial model

	cout << "recovering ground-truth info on this model (" << frameID << ")....\n";

	char fName[300];
	if (theInput == DANCING)
		sprintf(fName, "..\\..\\..\\code\\input\\animation\\model_%d_partial_grd.dat", mesh2->frameID);
	else if (theInput == JUMPING)
		sprintf(fName, "..\\..\\..\\code\\input\\phuman\\phuman%d_partial_grd.dat", mesh2->frameID);
	else if (theInput == HORSE)
		sprintf(fName, "..\\..\\..\\code\\input\\toscahires-asci\\off\\horse%d_partial_grd.dat", mesh2->frameID);
	FILE* fPtr = fopen(fName, "w");

	//each vertex v in partial model mesh2 inherits its ground-truth value from the closest point on the full model mesh1; cropping not chnage vert coords, so closest pnt will have 0 dist to v
assert((int) mesh2->verts.size() <= (int) verts.size());
	for (int v = 0; v < (int) mesh2->verts.size(); v++)
	{
		float minDist = INF;
		int closestOnMesh1 = -1;
		for (int w = 0; minDist > 0.0f && w < (int) verts.size(); w++) //closest pnt will have 0 dist for sure due to perfect alignment; so, shortcut
		{
			float dist = distanceBetween2(mesh2->verts[v]->coords, verts[w]->coords); //sqrt skipped to save time
			if (dist < minDist)
			{
				minDist = dist;
				closestOnMesh1 = w;
			}
		}
		fprintf(fPtr, "%d\t%d\n", v, closestOnMesh1);
assert(closestOnMesh1 != -1);
if (minDist != 0.0f) cout << "\t\t" << minDist << endl;
if (! (v % 1000)) cout << v << " / " << (int) mesh2->verts.size() << endl;
	}
	fclose(fPtr);

	cout << "done!\n\n";
}


///////////// format of the *.partial_grd.dat files //////////////////
part-model-vertex-id	its-ground-truth-counterpart-on-complete-model

so, in other words, left is a vertex id from part model (mesh2) and right is its grd-truth correspondence on complete model (mesh1, or this in c++ way)


these stuff has been extracted and used for the following paper to be cited:
[1] Y. Sahillioglu, Y. Yemez, Scale Normalization for Isometric Shape Matching, Computer Graphics Forum (Proc. Pacific Graphics), 31, 7, 2012.



--ysf
