// check if this point on any face
UgIterator < UgFace > curFace;
while ( !curFace.isFinished ( ) )
{
// point3List 是个link list,含有X3D文档中提取的用来描述一个面的坐标。
point3ListIt = point3List->begin();
// once found the matching face, check the next point
if ( closestPoint->isEqual( *point3ListIt, 0.0000001f) == true)
{
cout<< "current point is equal" << endl;
bMatched = true;
point3ListIt++;
}
// else try next face in the part then
else
{
cout<< "current point is not equal" << endl;
point3ListIt = point3List->begin();
bMatched = false;
break;
}
}
// if all points in this array(Face) matching with this face, the two faces are matching
if(point3ListIt == point3List->end() && bMatched == true)
{
// Get the name of the matching face
faceName = (*curFace)->getName ( );
return faceName;
}
else
{
curFace.findNext( );
}
}