Are we talking about the same SuperCover algorithm ?
I can't figure any connection with a polygons been facing the camera.
void calcScreenSuperCoverLine(int x1, int y1, int x2, int y2, CLongArray&
linepoints)
{
int dx = (x2 - x1 >= 0 ? 1 : -1);
int dy = (y2 - y1 >= 0 ? 1 : -1);
int lengthX = abs(x2 - x1);
int lengthY = abs(y2 - y1);
linepoints.Add(x1);
linepoints.Add(y1);
int x = x1;
int y = y1;
for (int ix = 0, iy = 0; ix < lengthX || iy < lengthY;)
{
if ((0.5+ix) / lengthX < (0.5+iy) / lengthY)
{
// next step is horizontal
x += dx;
ix++;
}
else
{
// next step is vertical
y += dy;
iy++;
}
linepoints.Add(x);
linepoints.Add(y);
}
}
------
Softimage Mailing List.
To unsubscribe, send a mail to [email protected] with
"unsubscribe" in the subject, and reply to confirm.