the case of 5 faces with 3 vertexen is now handled. it looks like there might

be a bug in my face visiting code that's causing process_corners to think some
numver of faces < 5 are being visted when really 5 are. I'll sort that out
later (at worst causes a little overdraw).
This commit is contained in:
Bill Currie 2000-12-01 05:41:05 +00:00
parent fefe5df1bc
commit 257c0eb64a

View file

@ -428,10 +428,19 @@ process_corners (struct box_def *box)
insert_cube_vertexen (box, visit[(i + 2) % 5].face, visit[(i + 4) % 5].leave + 1, 1, v);
} else {
// 3 vertexen
unsigned int sel = (((abs (visit[2].face - visit[0].face) == 3) << 2)
| ((abs (visit[3].face - visit[1].face) == 3) << 1)
| ((abs (visit[5].face - visit[2].face) == 3) << 0));
center = visit[((sel * 3) - 6) % 5].face;
vec3_t v[3];
center = ((sel * 3) - 6) % 5;
for (i = 0; i < 3; i++)
find_cube_vertex (visit[center].face, visit[(center + 1 + i) % 5].face, visit[(center + 2 + i) % 5].face, v[i]);
insert_cube_vertexen (box, visit[center].face, visit[center].leave + 1, 3, v[0], v[1], v[2]);
insert_cube_vertexen (box, visit[(center + 1) % 5].face, visit[(center + 1) % 5].leave + 1, 1, v[0]);
insert_cube_vertexen (box, visit[(center + 2) % 5].face, visit[(center + 2) % 5].leave + 1, 2, v[1], v[0]);
insert_cube_vertexen (box, visit[(center + 3) % 5].face, visit[(center + 3) % 5].leave + 1, 2, v[2], v[1]);
insert_cube_vertexen (box, visit[(center + 4) % 5].face, visit[(center + 4) % 5].leave + 1, 1, v[2]);
}
break;
case 6: