21 |
|
#define C_1SIDEDTHICK 0.005 |
22 |
|
|
23 |
|
int o_face(), o_cone(), o_sphere(), o_ring(), o_cylinder(); |
24 |
< |
int o_instance(), o_source(), o_illum(); |
24 |
> |
int o_instance(), o_illum(); |
25 |
|
int o_plastic(), o_metal(), o_glass(), o_dielectric(), |
26 |
< |
o_mirror(), o_trans(), o_light(); |
26 |
> |
o_mirror(), o_trans(), o_light(); |
27 |
|
|
28 |
|
extern void free(); |
29 |
|
extern char *malloc(); |
194 |
|
fprintf(stderr, "%s: bad %s \"%s\"\n", typ, id); |
195 |
|
exit(1); |
196 |
|
} |
197 |
< |
} else if (lu_find(&rmats, mod)->data != NULL) /* make alias */ |
198 |
< |
newmat(id, mod); |
197 |
> |
} else { /* unsupported */ |
198 |
> |
o_unsupported(mod, typ, id, fa); |
199 |
> |
if (lu_find(&rmats, mod)->data != NULL) /* make alias */ |
200 |
> |
newmat(id, mod); |
201 |
> |
} |
202 |
|
} |
203 |
|
|
204 |
|
|
299 |
|
add2dispatch("spotlight", o_light); |
300 |
|
add2dispatch("glow", o_light); |
301 |
|
add2dispatch("illum", o_illum); |
302 |
< |
puts("# The following was converted from Radiance scene input"); |
302 |
> |
puts("# The following was converted from RADIANCE scene input"); |
303 |
|
if (hasmult) |
304 |
|
printf("xf -s %.4e\n", unit_mult); |
305 |
|
printf("o %s\n", curobj); |
311 |
|
puts("o"); |
312 |
|
if (hasmult) |
313 |
|
puts("xf"); |
314 |
< |
puts("# End of data converted from Radiance scene input"); |
314 |
> |
puts("# End of data converted from RADIANCE scene input"); |
315 |
|
lu_done(&rdispatch); |
316 |
|
lu_done(&rmats); |
317 |
|
lu_done(&vertab); |
391 |
|
|
392 |
|
|
393 |
|
int |
394 |
+ |
o_unsupported(mod, typ, id, fa) /* mark unsupported primitive */ |
395 |
+ |
char *mod, *typ, *id; |
396 |
+ |
FUNARGS *fa; |
397 |
+ |
{ |
398 |
+ |
register int i; |
399 |
+ |
|
400 |
+ |
fputs("\n# Unsupported RADIANCE primitive:\n", stdout); |
401 |
+ |
printf("# %s %s %s", mod, typ, id); |
402 |
+ |
printf("\n# %d", fa->nsargs); |
403 |
+ |
for (i = 0; i < fa->nsargs; i++) |
404 |
+ |
printf(" %s", fa->sarg[i]); |
405 |
+ |
#ifdef IARGS |
406 |
+ |
printf("\n# %d", fa->niargs); |
407 |
+ |
for (i = 0; i < fa->niargs; i++) |
408 |
+ |
printf(" %ld", fa->iarg[i]); |
409 |
+ |
#else |
410 |
+ |
fputs("\n# 0", stdout); |
411 |
+ |
#endif |
412 |
+ |
printf("\n# %d", fa->nfargs); |
413 |
+ |
for (i = 0; i < fa->nfargs; i++) |
414 |
+ |
printf(" %g", fa->farg[i]); |
415 |
+ |
fputs("\n\n", stdout); |
416 |
+ |
return(0); |
417 |
+ |
} |
418 |
+ |
|
419 |
+ |
|
420 |
+ |
int |
421 |
|
o_face(mod, typ, id, fa) /* print out a polygon */ |
422 |
|
char *mod, *typ, *id; |
423 |
|
FUNARGS *fa; |
563 |
|
putchar('\n'); |
564 |
|
clrverts(); /* vertex id's no longer reliable */ |
565 |
|
return(0); |
536 |
– |
} |
537 |
– |
|
538 |
– |
|
539 |
– |
int |
540 |
– |
o_source(mod, typ, id, fa) /* convert a source */ |
541 |
– |
char *mod, *typ, *id; |
542 |
– |
FUNARGS *fa; |
543 |
– |
{ |
544 |
– |
return(0); /* there is no MGF equivalent! */ |
566 |
|
} |
567 |
|
|
568 |
|
|