2 ms·
Since we're playing Space Nazi, I like this better: for (int i = 0; i < in->numVerts; i++) { dot = plane.Distance (in->verts[i]); dists[i] =
by georgeorwell 14y ago
Since we're playing Space Nazi, I like this better:
for (int i = 0; i < in->numVerts; i++)
{
dot = plane.Distance (in->verts[i]);
dists[i] = dot;
sides[i] =
dot < -LIGHT_CLIP_EPSILON ? SIDE_BACK :
dot > LIGHT_CLIP_EPSILON ? SIDE_FRONT : SIDE_ON;
counts[sides[i]]++;
}
Note that emacs will tab-align the table rows properly if you break the sides[i] = line after the = which is why I did it; not sure about vim.