| 34 |
|
mg_ehand[MG_E_COMMENT] = r_comment; |
| 35 |
|
mg_ehand[MG_E_COLOR] = c_hcolor; |
| 36 |
|
mg_ehand[MG_E_CONE] = r_cone; |
| 37 |
+ |
mg_ehand[MG_E_CMIX] = c_hcolor; |
| 38 |
+ |
mg_ehand[MG_E_CSPEC] = c_hcolor; |
| 39 |
|
mg_ehand[MG_E_CXY] = c_hcolor; |
| 40 |
|
mg_ehand[MG_E_CYL] = r_cyl; |
| 41 |
|
mg_ehand[MG_E_ED] = c_hmaterial; |
| 339 |
|
/* put out xform command */ |
| 340 |
|
printf("\n!xform"); |
| 341 |
|
oname = object(); |
| 342 |
< |
if (*oname) |
| 343 |
< |
printf(" -n %s", oname); |
| 342 |
> |
if (*oname) { |
| 343 |
> |
printf(" -n "); |
| 344 |
> |
for (op = oname; op[1]; op++) /* remove trailing separator */ |
| 345 |
> |
putchar(*op); |
| 346 |
> |
} |
| 347 |
|
for (i = xa0; i < ac; i++) |
| 348 |
|
printf(" %s", av[i]); |
| 349 |
|
if (ac > xa0 && xf_argc > 0) |
| 427 |
|
c_cmaterial->rs + c_cmaterial->ts; |
| 428 |
|
if (d <= 0. | d >= 1.) |
| 429 |
|
return(NULL); |
| 430 |
< |
if (c_cmaterial->td > .01 || c_cmaterial->ts > .01) { /* trans */ |
| 430 |
> |
/* check for trans */ |
| 431 |
> |
if (c_cmaterial->td > .01 || c_cmaterial->ts > .01) { |
| 432 |
|
double ts, a5, a6; |
| 433 |
|
|
| 434 |
|
ts = sqrt(c_cmaterial->ts); /* because we use 2 sides */ |
| 456 |
|
ts/(ts + c_cmaterial->td)); |
| 457 |
|
return(mname); |
| 458 |
|
} |
| 459 |
< |
if (c_cmaterial->rs < .01 || isgrey(&c_cmaterial->rs_c)) { /* plastic */ |
| 459 |
> |
/* check for plastic */ |
| 460 |
> |
if (c_cmaterial->rs < .01 || c_isgrey(&c_cmaterial->rs_c)) { |
| 461 |
|
if (c_cmaterial->rs > .999) |
| 462 |
|
cvtcolor(radrgb, &c_cmaterial->rd_c, 1.); |
| 463 |
|
else |
| 493 |
|
{ |
| 494 |
|
static COLOR ciexyz; |
| 495 |
|
|
| 496 |
+ |
c_ccvt(ciec, C_CSXY); /* get xy representation */ |
| 497 |
|
ciexyz[1] = intensity; |
| 498 |
|
ciexyz[0] = ciec->cx/ciec->cy*ciexyz[1]; |
| 499 |
|
ciexyz[2] = ciexyz[1]*(1./ciec->cy - 1.) - ciexyz[0]; |