version 1.2 | | version 1.3 |
---|
| | |
* Interrogation functions for segment data structure. | | * Interrogation functions for segment data structure. |
* | | * |
* $Log$ | | * $Log$ |
| | * Revision 1.3 2003/03/09 06:34:09 donut |
| | * change byte typedef to sbyte to avoid conflict with win32 byte which is unsigned |
| | * |
* Revision 1.2 1999/09/02 13:37:06 sekmu | | * Revision 1.2 1999/09/02 13:37:06 sekmu |
* remove warning in editor compile | | * remove warning in editor compile |
* | | * |
| | |
| | |
// [side] [index] [cur:next] | | // [side] [index] [cur:next] |
// To remap the vertices on a side after a forward rotation | | // To remap the vertices on a side after a forward rotation |
byte xlate_previous[6][4][2] = { | | sbyte xlate_previous[6][4][2] = { |
{ {7, 3}, {3, 2}, {2, 6}, {6, 7} }, // remapping left to left | | { {7, 3}, {3, 2}, {2, 6}, {6, 7} }, // remapping left to left |
{ {5, 4}, {4, 0}, {7, 3}, {6, 7} }, // remapping back to top | | { {5, 4}, {4, 0}, {7, 3}, {6, 7} }, // remapping back to top |
{ {5, 4}, {1, 5}, {0, 1}, {4, 0} }, // remapping right to right | | { {5, 4}, {1, 5}, {0, 1}, {4, 0} }, // remapping right to right |
| | |
} | | } |
} | | } |
| | |
byte xlate_previous_right[6][4][2] = { | | sbyte xlate_previous_right[6][4][2] = { |
{ {5, 6}, {6, 7}, {2, 3}, {1, 2} }, // bottom to left | | { {5, 6}, {6, 7}, {2, 3}, {1, 2} }, // bottom to left |
{ {6, 7}, {7, 4}, {3, 0}, {2, 3} }, // left to top | | { {6, 7}, {7, 4}, {3, 0}, {2, 3} }, // left to top |
{ {7, 4}, {4, 5}, {0, 1}, {3, 0} }, // top to right | | { {7, 4}, {4, 5}, {0, 1}, {3, 0} }, // top to right |
| | |
// Combine duplicate vertices. | | // Combine duplicate vertices. |
// If two vertices have the same coordinates, within some small tolerance, then assign | | // If two vertices have the same coordinates, within some small tolerance, then assign |
// the same vertex number to the two vertices, freeing up one of the vertices. | | // the same vertex number to the two vertices, freeing up one of the vertices. |
void med_combine_duplicate_vertices(byte *vlp) | | void med_combine_duplicate_vertices(sbyte *vlp) |
{ | | { |
int v,w; | | int v,w; |
| | |