Game Development Reference
In-Depth Information
ptcon->border = count;
//Reset search with next unused polygon
for (plyindex = 1; plyindex < plycount; plyindex++){
//Find next polygon
if (plyscan[plyindex]{
if (plyscan[plyindex]->p[0] == ptindex){
ptcon->p[count++] = plyscan[0]->p[2];
ptcon->p[count] = plyscan[0]->p[1];
}
if (plyscan[plyindex]->p[1] == ptindex){
ptcon->p[count++] = plyscan[0]->p[0];
ptcon->p[count] = plyscan[0]->p[2];
}
if (plyscan[plyindex]->p[2] == ptindex){
ptcon->p[count++] = plyscan[0]->p[1];
ptcon->p[count] = plyscan[0]->p[0];
}
ptcon->valence += 2;
vindex = ptcon->p[count++];
plyscan[plyindex] = NULL;
break;
}
}
}
}
}else{
//Point index not found must be a point with
//no polygons so ignore it.
ptcon->valence = 0;
}
if (ptcon->border && ptcon->border!=plycount){
memcpy(p, ptcon->p, sizeof(USHORT)*ptcon->valence);
memcpy(ptcon->p, &p[ptcon->border],
sizeof(USHORT)*(plycount - ptcon->border);
memcpy(&ptcon->p[plycount - ptcon->border], p,
sizeof(USHORT) * ptcon->border);
}
ptcon++;
}
return TRUE;
}
Search Nedrilad ::




Custom Search