1 |
< |
/* Copyright (c) 1994 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1995 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
346 |
|
error(COMMAND, "missing angle"); |
347 |
|
return; |
348 |
|
} |
349 |
< |
if (getinterest(sskip(sskip(s)), 0, vc, &mag) < 0) |
349 |
> |
if (getinterest(sskip2(s,2), 0, vc, &mag) < 0) |
350 |
|
return; |
351 |
|
moveview(angle, elev, mag, vc); |
352 |
|
} |
492 |
|
extern double shadthresh; |
493 |
|
extern double shadcert; |
494 |
|
extern COLOR ambval; |
495 |
+ |
extern int ambvwt; |
496 |
|
extern double ambacc; |
497 |
|
extern int ambres; |
498 |
|
extern int ambdiv; |
499 |
|
extern int ambssamp; |
500 |
|
extern int ambounce; |
501 |
+ |
extern COLOR cextinction; |
502 |
+ |
extern double salbedo; |
503 |
+ |
extern double seccg; |
504 |
+ |
extern double ssampdist; |
505 |
|
extern int directvis; |
506 |
|
extern double srcsizerat; |
507 |
|
extern int do_irrad; |
512 |
|
|
513 |
|
if (s[0] == '\0') { |
514 |
|
(*dev->comout)( |
515 |
< |
"aa ab ad ar as av b dc di dj ds dt i lr lw ps pt sj st bv: "); |
515 |
> |
"aa ab ad ar as av aw b dc dv dj ds dt i lr lw me ma mg ms ps pt sj st bv: "); |
516 |
|
(*dev->comin)(buf, NULL); |
517 |
|
s = buf; |
518 |
|
} |
557 |
|
getparam(s+2, "back face visibility", 'b', &backvis); |
558 |
|
break; |
559 |
|
case '\0': /* black and white */ |
560 |
+ |
case ' ': |
561 |
|
case 'y': case 'Y': case 't': case 'T': case '1': case '+': |
562 |
|
case 'n': case 'N': case 'f': case 'F': case '0': case '-': |
563 |
|
getparam(s+1, "black and white", 'b', &greyscale); |
574 |
|
case 'v': /* value */ |
575 |
|
getparam(s+2, "ambient value", 'C', (COLOR *)ambval); |
576 |
|
break; |
577 |
+ |
case 'w': /* weight */ |
578 |
+ |
getparam(s+2, "ambient value weight", 'i', &ambvwt); |
579 |
+ |
break; |
580 |
|
case 'a': /* accuracy */ |
581 |
|
if (getparam(s+2, "ambient accuracy", 'r', &ambacc)) |
582 |
|
setambacc(ambacc); |
598 |
|
goto badparam; |
599 |
|
} |
600 |
|
break; |
601 |
+ |
case 'm': /* medium */ |
602 |
+ |
switch (s[1]) { |
603 |
+ |
case 'e': /* extinction coefficient */ |
604 |
+ |
getparam(s+2, "extinction coefficient", 'C', |
605 |
+ |
(COLOR *)cextinction); |
606 |
+ |
break; |
607 |
+ |
case 'a': /* scattering albedo */ |
608 |
+ |
getparam(s+2, "scattering albedo", 'r', &salbedo); |
609 |
+ |
break; |
610 |
+ |
case 'g': /* scattering eccentricity */ |
611 |
+ |
getparam(s+2, "scattering eccentricity", 'r', &seccg); |
612 |
+ |
break; |
613 |
+ |
case 's': /* sampling distance */ |
614 |
+ |
getparam(s+2, "mist sampling distance", 'r', |
615 |
+ |
&ssampdist); |
616 |
+ |
break; |
617 |
+ |
default: |
618 |
+ |
goto badparam; |
619 |
+ |
} |
620 |
+ |
break; |
621 |
|
case 'p': /* pixel */ |
622 |
|
switch (s[1]) { |
623 |
|
case 's': /* sample */ |
666 |
|
thisray.rmax = 0.0; |
667 |
|
|
668 |
|
if (!sscanvec(s, thisray.rorg) || |
669 |
< |
!sscanvec(sskip(sskip(sskip(s))), thisray.rdir)) { |
669 |
> |
!sscanvec(sskip2(s,3), thisray.rdir)) { |
670 |
|
|
671 |
|
if (dev->getcur == NULL) |
672 |
|
return; |
703 |
|
if (thisray.rot >= FHUGE) |
704 |
|
(*dev->comout)("at infinity"); |
705 |
|
else { |
706 |
< |
sprintf(buf, "at (%.6g %.6g %.6g)", thisray.rop[0], |
707 |
< |
thisray.rop[1], thisray.rop[2]); |
706 |
> |
sprintf(buf, "at (%.6g %.6g %.6g) (%.6g)", |
707 |
> |
thisray.rop[0], thisray.rop[1], |
708 |
> |
thisray.rop[2], thisray.rt); |
709 |
|
(*dev->comout)(buf); |
710 |
|
} |
711 |
|
(*dev->comin)(buf, NULL); |