141 int check_mask, check_color, check_transp;
142 int check_material, check_emis, check_shin;
143 typbuff *buff, *cobuff, *trbuff, *embuff, *shbuff;
144 int xmod, ymod, row, col, cnt, xcnt, ycnt;
145 long offset, y1off, y2off;
146 float x1, x2, y1, y2, tx, ty, tz, ttr;
147 float n[3], pt[4], xres, yres, ymax, zexag;
148 int em_src, sh_src, trans_src, col_src, curcolor;
149 gsurf_att *ematt, *shatt, *tratt, *coloratt;
152 GLdouble modelMatrix[16], projMatrix[16];
157 float sz, mag, tedge1[3], tedge2[3], crossp[3], triv[3][3];
158 double asurf = 0.0, axsurf = 0.0;
161 int zeros, dr1, dr2, dr3, dr4;
162 int datarow1, datacol1, datarow2, datacol2;
164 float kem, ksh, pkem, pksh;
167 G_debug(3,
"gsd_surf_map_old");
185 check_mask = surf->curmask ? 1 : 0;
193 xres = xmod * surf->xres;
194 yres = ymod * surf->yres;
195 ymax = (surf->rows - 1) * surf->yres;
203 window[0] += (int)(yres * 2);
204 window[1] -= (int)(yres * 2);
205 window[2] -= (int)(xres * 2);
206 window[3] += (int)(xres * 2);
212 zexag = surf->z_exag;
230 tratt = &(surf->att[ATT_TRANSP]);
231 ktrans = (255 << 24);
232 trans_src = surf->att[ATT_TRANSP].att_src;
234 if (CONST_ATT == trans_src && surf->att[ATT_TRANSP].constant != 0.0) {
235 ktrans = (255 - (int)surf->att[ATT_TRANSP].constant) << 24;
239 else if (MAP_ATT == trans_src) {
241 check_transp = trbuff ? 1 : 0;
247 ematt = &(surf->att[ATT_EMIT]);
250 em_src = surf->att[ATT_EMIT].att_src;
252 if (CONST_ATT == em_src) {
253 kem = surf->att[ATT_EMIT].constant / 255.;
255 else if (MAP_ATT == em_src) {
257 check_emis = embuff ? 1 : 0;
261 shatt = &(surf->att[ATT_SHINE]);
264 sh_src = surf->att[ATT_SHINE].att_src;
266 if (CONST_ATT == sh_src) {
267 ksh = surf->att[ATT_SHINE].constant / 255.;
270 else if (MAP_ATT == sh_src) {
272 check_shin = shbuff ? 1 : 0;
278 coloratt = &(surf->att[ATT_COLOR]);
279 col_src = surf->att[ATT_COLOR].att_src;
281 if (col_src != MAP_ATT) {
282 if (col_src == CONST_ATT) {
283 curcolor = (int)surf->att[ATT_COLOR].constant;
286 curcolor = surf->wire_color;
292 check_material = (check_shin || check_emis || (kem && check_color));
298 for (row = 0; row < ycnt; row++) {
307 datarow1 = row * ymod;
308 datarow2 = (row + 1) * ymod;
310 y1 = ymax - row * yres;
311 y2 = ymax - (row + 1) * yres;
312 y1off = row * ymod * surf->cols;
313 y2off = (row + 1) * ymod * surf->cols;
318 dr1 = dr2 = dr3 = dr4 = 1;
321 if (
BM_get(surf->curmask, 0, datarow1)) {
326 if (
BM_get(surf->curmask, 0, datarow2)) {
334 FNORM(surf->norms[offset], n);
346 ktrans = (char)
SCALE_ATT(tratt, ttr, 0, 255);
347 ktrans = (char)(255 - ktrans) << 24;
359 FNORM(surf->norms[offset], n);
371 ktrans = (char)
SCALE_ATT(tratt, ttr, 0, 255);
372 ktrans = (char)(255 - ktrans) << 24;
375 if (check_material) {
386 if (pksh != ksh || pkem != kem || (kem && check_color)) {
404 for (col = 0; col < xcnt; col++) {
405 datacol1 = col * xmod;
406 datacol2 = (col + 1) * xmod;
409 x2 = (col + 1) * xres;
412 dr1 = dr2 = dr3 = dr4 = 1;
415 if (
BM_get(surf->curmask, datacol1, datarow1)) {
420 if (
BM_get(surf->curmask, datacol1, datarow2)) {
425 if (
BM_get(surf->curmask, datacol2, datarow2)) {
430 if (
BM_get(surf->curmask, datacol2, datarow1)) {
435 if ((zeros > 1) && cnt) {
450 offset = y1off + datacol1;
451 FNORM(surf->norms[offset], n);
471 ktrans = (char)
SCALE_ATT(tratt, ttr, 0, 255);
472 ktrans = (char)(255 - ktrans) << 24;
475 if (check_material) {
486 if (pksh != ksh || pkem != kem ||
487 (kem && check_color)) {
505 offset = y2off + datacol1;
506 FNORM(surf->norms[offset], n);
526 ktrans = (char)
SCALE_ATT(tratt, ttr, 0, 255);
527 ktrans = (char)(255 - ktrans) << 24;
530 if (check_material) {
541 if (pksh != ksh || pkem != kem ||
542 (kem && check_color)) {
561 offset = y1off + datacol2;
562 FNORM(surf->norms[offset], n);
582 ktrans = (char)
SCALE_ATT(tratt, ttr, 0, 255);
583 ktrans = (char)(255 - ktrans) << 24;
586 if (check_material) {
597 if (pksh != ksh || pkem != kem || (kem && check_color)) {
630 offset = y2off + datacol2;
631 FNORM(surf->norms[offset], n);
651 ktrans = (char)
SCALE_ATT(tratt, ttr, 0, 255);
652 ktrans = (char)(255 - ktrans) << 24;
655 if (check_material) {
666 if (pksh != ksh || pkem != kem || (kem && check_color)) {
709 G_debug(5,
" Surface Area: %.12lf", asurf);
710 G_debug(5,
" Exaggerated Surface Area: %.12lf", axsurf);
731 int do_diff, check_mask, check_color;
733 int xmod, ymod, row, col, cnt, xcnt, ycnt;
734 long offset, y1off, y2off;
735 float x1, x2, y1, y2, tx, ty, tz;
736 float n[3], pt[4], xres, yres, ymax, zexag;
737 int col_src, curcolor;
741 GLdouble modelMatrix[16], projMatrix[16];
745 int zeros, dr1, dr2, dr3, dr4;
746 int datarow1, datacol1, datarow2, datacol2;
748 unsigned int ktrans = 255;
750 G_debug(5,
"gsd_surf_const(): id=%d", surf->gsurf_id);
759 check_mask = surf->curmask ? 1 : 0;
768 xres = xmod * surf->xres;
769 yres = ymod * surf->yres;
773 ymax = (surf->rows - 1) * surf->yres;
778 window[0] += (int)(yres * 2);
779 window[1] -= (int)(yres * 2);
780 window[2] -= (int)(xres * 2);
781 window[3] += (int)(xres * 2);
798 zexag = surf->z_exag;
800 if (CONST_ATT == surf->att[ATT_TRANSP].att_src) {
802 ktrans = 255 - (int)surf->att[ATT_TRANSP].constant;
806 ktrans = (ktrans << 24);
812 coloratt = &(surf->att[ATT_COLOR]);
813 col_src = surf->att[ATT_COLOR].att_src;
815 if (col_src != MAP_ATT) {
816 if (col_src == CONST_ATT) {
817 curcolor = (int)surf->att[ATT_COLOR].constant;
820 curcolor = surf->wire_color;
833 if (!check_color && !check_mask && !do_diff) {
858 for (row = 0; row < ycnt; row++) {
867 datarow1 = row * ymod;
868 datarow2 = (row + 1) * ymod;
870 y1 = ymax - row * yres;
871 y2 = ymax - (row + 1) * yres;
872 y1off = row * ymod * surf->cols;
873 y2off = (row + 1) * ymod * surf->cols;
878 dr1 = dr2 = dr3 = dr4 = 1;
881 if (
BM_get(surf->curmask, 0, datarow1)) {
886 if (
BM_get(surf->curmask, 0, datarow2)) {
924 for (col = 0; col < xcnt; col++) {
925 datacol1 = col * xmod;
926 datacol2 = (col + 1) * xmod;
929 x2 = (col + 1) * xres;
932 dr1 = dr2 = dr3 = dr4 = 1;
935 if (
BM_get(surf->curmask, datacol1, datarow1)) {
940 if (
BM_get(surf->curmask, datacol1, datarow2)) {
945 if (
BM_get(surf->curmask, datacol2, datarow2)) {
950 if (
BM_get(surf->curmask, datacol2, datarow1)) {
955 if ((zeros > 1) && cnt) {
969 offset = y1off + datacol1;
994 offset = y2off + datacol1;
1020 offset = y1off + datacol2;
1045 offset = y2off + datacol2;
1110 Point3 *points1, Point3 *points2,
float *norm)
1112 int i, i1, i2, nlong, offset, col_src;
1113 int check_color1, check_color2, color1, color2;
1114 typbuff *cobuf1, *cobuf2;
1115 gsurf_att *coloratt1, *coloratt2;
1117 check_color1 = check_color2 = 1;
1119 col_src = surf1->att[ATT_COLOR].att_src;
1121 if (col_src != MAP_ATT) {
1122 if (col_src == CONST_ATT) {
1123 color1 = (int)surf1->att[ATT_COLOR].constant;
1126 color1 = surf1->wire_color;
1132 coloratt1 = &(surf1->att[ATT_COLOR]);
1135 col_src = surf2->att[ATT_COLOR].att_src;
1136 if (col_src != MAP_ATT) {
1137 if (col_src == CONST_ATT) {
1138 color2 = (int)surf2->att[ATT_COLOR].constant;
1141 color2 = surf2->wire_color;
1147 coloratt2 = &(surf2->att[ATT_COLOR]);
1156 for (nlong = (npts1 > npts2 ? npts1 : npts2), i = 0; i < nlong; i++) {
1157 i1 = i * npts1 / nlong;
1158 i2 = i * npts2 / nlong;
1159 offset =
XY2OFF(surf1, points1[i1][
X], points1[i1][
Y]);
1165 offset =
XY2OFF(surf1, points2[i2][
X], points2[i2][
Y]);
1172 if (npts1 > npts2) {
1173 points1[i1][
X] += surf1->x_trans;
1174 points1[i1][
Y] += surf1->y_trans;
1175 points1[i1][Z] += surf1->z_trans;
1177 points2[i2][
X] += surf2->x_trans;
1178 points2[i2][
Y] += surf2->y_trans;
1179 points2[i2][Z] += surf2->z_trans;
1183 points2[i2][
X] += surf2->x_trans;
1184 points2[i2][
Y] += surf2->y_trans;
1185 points2[i2][Z] += surf2->z_trans;
1187 points1[i1][
X] += surf1->x_trans;
1188 points1[i1][
Y] += surf1->y_trans;
1189 points1[i1][Z] += surf1->z_trans;
1326 int n, i, offset, col_src, check_color[MAX_SURFS];
1327 int color, colors[MAX_SURFS], nocolor;
1328 typbuff *cobuf[MAX_SURFS];
1329 gsurf_att *coloratt[MAX_SURFS];
1331 nocolor = FCmode == FC_GREY ? 1 : 0;
1334 for (n = 0; n < ns; ++n) {
1337 col_src = gsurfs[n]->att[ATT_COLOR].att_src;
1339 if (col_src != MAP_ATT) {
1340 if (col_src == CONST_ATT) {
1341 colors[n] = (int)gsurfs[n]->att[ATT_COLOR].constant;
1344 colors[n] = gsurfs[n]->wire_color;
1350 coloratt[n] = &(gsurfs[n]->att[ATT_COLOR]);
1380 int bn, bnl, ctop, cbot, ctopl, cbotl, bsret;
1384 ctop = cbot = ctopl = cbotl = color;
1387 for (n = 0; n < ns; ++n) {
1388 for (i = 0; i < np; i++) {
1390 (bsret = get_point_below(points, gsurfs, i, n, ns, &bn))) {
1397 if (FCmode == FC_ABOVE) {
1398 ctop = cbot = colors[n];
1400 else if (FCmode == FC_BELOW) {
1401 ctop = cbot = colors[bn];
1411 if (!transpoint_is_masked(gsurfs[n],
1412 points[n][i - 1]) &&
1413 !transpoint_is_masked(gsurfs[bn],
1414 points[bn][i - 1])) {
1416 1.0, points[n][i][Z], 0.0,
1417 points[bn][i - 1][Z], 1.0,
1418 points[bn][i][Z], &tx,
1421 xing[
Y] = points[n][i - 1][
Y] +
1422 tx * (points[n][i][
Y] -
1423 points[n][i - 1][
Y]);
1424 xing[
X] = points[n][i - 1][
X] +
1425 tx * (points[n][i][
X] -
1426 points[n][i - 1][
X]);
1428 xing[Z] = points[bn][i - 1][Z] +
1429 tx * (points[bn][i][Z] -
1430 points[bn][i - 1][Z]);
1442 while (i < np && 0 < (bsret = get_point_below(
1443 points, gsurfs, i, n, ns, &bn))) {
1460 if (FCmode == FC_ABOVE) {
1461 ctop = cbot = colors[n];
1463 else if (FCmode == FC_BELOW) {
1464 ctop = cbot = colors[bn];
1495 if (bnl >= 0 && bnl != bn) {
1500 if (!transpoint_is_masked(gsurfs[n],
1501 points[n][i - 1]) &&
1502 !transpoint_is_masked(gsurfs[bnl],
1503 points[bnl][i - 1]) &&
1504 !transpoint_is_masked(gsurfs[bn],
1505 points[bn][i - 1])) {
1508 0.0, points[n][i - 1][Z], 1.0,
1509 points[n][i][Z], 0.0,
1510 points[bn][i - 1][Z], 1.0,
1511 points[bn][i][Z], &tx, &ty)) {
1516 "crossing going up at surf %d no. %d",
1521 xing[
Y] = points[n][i - 1][
Y] +
1522 tx * (points[n][i][
Y] -
1523 points[n][i - 1][
Y]);
1524 xing[
X] = points[n][i - 1][
X] +
1525 tx * (points[n][i][
X] -
1526 points[n][i - 1][
X]);
1529 xing[Z] = points[bnl][i - 1][Z] +
1530 tx * (points[bnl][i][Z] -
1531 points[bnl][i - 1][Z]);
1539 0.0, points[n][i - 1][Z], 1.0,
1540 points[n][i][Z], 0.0,
1541 points[bnl][i - 1][Z], 1.0,
1542 points[bnl][i][Z], &tx,
1548 "crossing going down at surf %d no. %d",
1553 xing[
Y] = points[n][i - 1][
Y] +
1554 tx * (points[n][i][
Y] -
1555 points[n][i - 1][
Y]);
1556 xing[
X] = points[n][i - 1][
X] +
1557 tx * (points[n][i][
X] -
1558 points[n][i - 1][
X]);
1561 xing[Z] = points[bnl][i - 1][Z] +
1562 tx * (points[bnl][i][Z] -
1563 points[bnl][i - 1][Z]);
1569 xing[Z] = points[bn][i - 1][Z] +
1570 tx * (points[bn][i][Z] -
1571 points[bn][i - 1][Z]);
1577 !transpoint_is_masked(gsurfs[bn],
1578 points[bn][i - 1]) &&
1579 !transpoint_is_masked(gsurfs[bnl],
1580 points[bnl][i - 1])) {
1583 0.0, points[bn][i - 1][Z], 1.0,
1584 points[bn][i][Z], 0.0,
1585 points[bnl][i - 1][Z], 1.0,
1586 points[bnl][i][Z], &tx, &ty)) {
1593 "lower crossing at surf %d no. %d "
1594 "between surfs %d & %d",
1598 xing[
Y] = points[bn][i - 1][
Y] +
1599 tx * (points[bn][i][
Y] -
1600 points[bn][i - 1][
Y]);
1601 xing[
X] = points[bn][i - 1][
X] +
1602 tx * (points[bn][i][
X] -
1603 points[bn][i - 1][
X]);
1605 z1 = xing[Z] = points[n][i - 1][Z] +
1606 tx * (points[n][i][Z] -
1607 points[n][i - 1][Z]);
1622 if (!upper && !lower) {
1623 G_debug(5,
"Crossing NOT found or masked:");
1625 " current surf: %d [ %.2f %.2f "
1626 "%.2f -> %.2f %.2f %f",
1627 n, points[n][i - 1][
X],
1628 points[n][i - 1][
Y],
1629 points[n][i - 1][Z],
1630 points[n][i][
X], points[n][i][
Y],
1633 " below surf: %d [ %.2f %.2f %.2f "
1634 "-> %.2f %.2f %f\n",
1635 bn, points[bn][i - 1][
X],
1636 points[bn][i - 1][
Y],
1637 points[bn][i - 1][Z],
1638 points[bn][i][
X], points[bn][i][
Y],
1641 gs
" last below surf: %d [ %.2f "
1642 "%.2f %.2f -> %.2f %.2f %f\n",
1643 bnl, points[bnl][i - 1][
X],
1644 points[bnl][i - 1][
Y],
1645 points[bnl][i - 1][Z],
1662 if (!transpoint_is_masked(gsurfs[n],
1663 points[n][i - 1]) &&
1664 !transpoint_is_masked(gsurfs[bn],
1665 points[bn][i - 1])) {
1667 1.0, points[n][i][Z], 0.0,
1668 points[bn][i - 1][Z], 1.0,
1669 points[bn][i][Z], &tx,
1672 xing[
Y] = points[n][i - 1][
Y] +
1673 tx * (points[n][i][
Y] -
1674 points[n][i - 1][
Y]);
1675 xing[
X] = points[n][i - 1][
X] +
1676 tx * (points[n][i][
X] -
1677 points[n][i - 1][
X]);
1809 int xmod, ymod, row, col, cnt, xcnt, ycnt;
1810 long offset, y1off, y2off;
1811 float x2, y1, y2, tx, ty, tz, sz;
1812 float n[3], pt[4], xres, yres, ymax, zexag;
1814#ifdef DO_ARROW_SOLID
1817 gsurf_att *coloratt;
1819 int check_color = 1;
1821 int zeros, dr1, dr2, dr3, dr4;
1822 int datarow1, datacol1, datarow2, datacol2;
1824 G_debug(3,
"gsd_norm_arrows");
1840 check_mask = surf->curmask ? 1 : 0;
1842#ifdef DO_ARROW_SOLID
1843 coloratt = &(surf->att[ATT_COLOR]);
1844 col_src = surf->att[ATT_COLOR].att_src;
1846 if (col_src != MAP_ATT) {
1847 if (col_src == CONST_ATT) {
1848 curcolor = (int)surf->att[ATT_COLOR].constant;
1851 curcolor = surf->wire_color;
1863 xres = xmod * surf->xres;
1864 yres = ymod * surf->yres;
1865 ymax = (surf->rows - 1) * surf->yres;
1874 zexag = surf->z_exag;
1877#ifdef DO_ARROW_SOLID
1885 for (row = 0; row < ycnt; row++) {
1892 datarow1 = row * ymod;
1893 datarow2 = (row + 1) * ymod;
1895 y1 = ymax - row * yres;
1896 y2 = ymax - (row + 1) * yres;
1897 y1off = row * ymod * surf->cols;
1898 y2off = (row + 1) * ymod * surf->cols;
1901 dr1 = dr2 = dr3 = dr4 = 1;
1904 if (
BM_get(surf->curmask, 0, datarow1)) {
1909 if (
BM_get(surf->curmask, 0, datarow2)) {
1917 FNORM(surf->norms[offset], n);
1923#ifdef DO_ARROW_SOLID
1928 gsd_3darrow(pt, curcolor, xres * 2, xres / 2, n, sz);
1931 gsd_arrow(pt, 0x000000, xres * 2, n, sz, surf);
1938 FNORM(surf->norms[offset], n);
1944#ifdef DO_ARROW_SOLID
1949 gsd_3darrow(pt, curcolor, xres * 2, xres / 2, n, sz);
1952 gsd_arrow(pt, 0x000000, xres * 2, n, sz, surf);
1959 for (col = 0; col < xcnt; col++) {
1960 datacol1 = col * xmod;
1961 datacol2 = (col + 1) * xmod;
1964 x2 = (col + 1) * xres;
1967 dr1 = dr2 = dr3 = dr4 = 1;
1970 if (
BM_get(surf->curmask, datacol1, datarow1)) {
1975 if (
BM_get(surf->curmask, datacol1, datarow2)) {
1980 if (
BM_get(surf->curmask, datacol2, datarow2)) {
1985 if (
BM_get(surf->curmask, datacol2, datarow1)) {
1990 if ((zeros > 1) && cnt) {
1997 offset = y1off + datacol2;
1998 FNORM(surf->norms[offset], n);
2004#ifdef DO_ARROW_SOLID
2009 gsd_3darrow(pt, curcolor, xres * 2, xres / 2, n, sz);
2012 gsd_arrow(pt, 0x000000, xres * 2, n, sz, surf);
2020 offset = y2off + datacol2;
2021 FNORM(surf->norms[offset], n);
2027#ifdef DO_ARROW_SOLID
2032 gsd_3darrow(pt, curcolor, xres * 2, xres / 2, n, sz);
2035 gsd_arrow(pt, 0x000000, xres * 2, n, sz, surf);
2063 int check_color, check_transp;
2064 int check_material, check_emis, check_shin;
2065 typbuff *buff, *cobuff, *trbuff, *embuff, *shbuff;
2067 int row, col, xcnt, ycnt;
2068 long y1off, y2off, y3off;
2072 float x1, x2, x3, y1, y2, y3, tx, ty, tz, ttr;
2073 float n[3], pt[4], xres, yres, ymax, zexag;
2074 int em_src, sh_src, trans_src, col_src, curcolor;
2075 gsurf_att *ematt, *shatt, *tratt, *coloratt;
2078 GLdouble modelMatrix[16], projMatrix[16];
2082 int datacol1, datacol2, datacol3;
2086 float kem, ksh, pkem, pksh;
2087 unsigned int ktrans;
2116 xres = xmod * surf->xres;
2117 yres = ymod * surf->yres;
2118 ymax = (surf->rows - 1) * surf->yres;
2130 zexag = surf->z_exag;
2133 window[0] += (int)(yres * 4 * zexag);
2134 window[1] -= (int)(yres * 4 * zexag);
2135 window[2] -= (int)(xres * 4 * zexag);
2136 window[3] += (int)(xres * 4 * zexag);
2146 tratt = &(surf->att[ATT_TRANSP]);
2147 ktrans = (255 << 24);
2148 trans_src = surf->att[ATT_TRANSP].att_src;
2150 if (CONST_ATT == trans_src && surf->att[ATT_TRANSP].constant != 0.0) {
2151 ktrans = (255 - (int)surf->att[ATT_TRANSP].constant) << 24;
2155 else if (MAP_ATT == trans_src) {
2157 check_transp = trbuff ? 1 : 0;
2163 ematt = &(surf->att[ATT_EMIT]);
2166 em_src = surf->att[ATT_EMIT].att_src;
2168 if (CONST_ATT == em_src) {
2169 kem = surf->att[ATT_EMIT].constant / 255.;
2171 else if (MAP_ATT == em_src) {
2173 check_emis = embuff ? 1 : 0;
2177 shatt = &(surf->att[ATT_SHINE]);
2180 sh_src = surf->att[ATT_SHINE].att_src;
2182 if (CONST_ATT == sh_src) {
2183 ksh = surf->att[ATT_SHINE].constant / 255.;
2186 else if (MAP_ATT == sh_src) {
2188 check_shin = shbuff ? 1 : 0;
2194 coloratt = &(surf->att[ATT_COLOR]);
2195 col_src = surf->att[ATT_COLOR].att_src;
2197 if (col_src != MAP_ATT) {
2198 if (col_src == CONST_ATT) {
2199 curcolor = (int)surf->att[ATT_COLOR].constant;
2202 curcolor = surf->wire_color;
2208 check_material = (check_shin || check_emis || (kem && check_color));
2213 for (row = start_val; row < ycnt; row += step_val) {
2240 y1 = ymax - row * yres;
2241 y2 = ymax - (row - (step_val / 2)) * yres;
2242 y3 = ymax - (row + (step_val / 2)) * yres;
2244 y1off = row * ymod * surf->cols;
2245 y2off = (row - (step_val / 2)) * ymod * surf->cols;
2246 y3off = (row + (step_val / 2)) * ymod * surf->cols;
2248 for (col = start_val; col < xcnt; col += step_val) {
2249 datacol1 = col * xmod;
2250 datacol2 = (col - (step_val / 2)) * xmod;
2251 datacol3 = (col + (step_val / 2)) * xmod;
2254 x2 = (col - (step_val / 2)) * xres;
2255 x3 = (col + (step_val / 2)) * xres;
2268 offset2[0] = y1off + datacol1;
2282 offset2[1] = y2off + datacol2;
2283 offset2[2] = y2off + datacol1;
2284 offset2[3] = y2off + datacol3;
2285 offset2[4] = y1off + datacol3;
2286 offset2[5] = y3off + datacol3;
2287 offset2[6] = y3off + datacol1;
2288 offset2[7] = y3off + datacol2;
2289 offset2[8] = y1off + datacol2;
2290 offset2[9] = y2off + datacol2;
2313 for (ii = 0; ii < 10; ii++) {
2323 FNORM(surf->norms[offset2[ii]], n);
2326 curcolor =
gs_mapcolor(cobuff, coloratt, offset2[ii]);
2330 ktrans = (char)
SCALE_ATT(tratt, ttr, 0, 255);
2331 ktrans = (char)(255 - ktrans) << 24;
2334 if (check_material) {
2345 if (pksh != ksh || pkem != kem || (kem && check_color)) {