--- ray/src/rt/rv2.c 1994/12/22 11:46:14 2.28 +++ ray/src/rt/rv2.c 1996/01/17 11:00:09 2.33 @@ -1,4 +1,4 @@ -/* Copyright (c) 1994 Regents of the University of California */ +/* Copyright (c) 1995 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -346,7 +346,7 @@ register char *s; error(COMMAND, "missing angle"); return; } - if (getinterest(sskip(sskip(s)), 0, vc, &mag) < 0) + if (getinterest(sskip2(s,2), 0, vc, &mag) < 0) return; moveview(angle, elev, mag, vc); } @@ -497,6 +497,10 @@ register char *s; extern int ambdiv; extern int ambssamp; extern int ambounce; + extern COLOR cextinction; + extern double salbedo; + extern double seccg; + extern double ssampdist; extern int directvis; extern double srcsizerat; extern int do_irrad; @@ -507,7 +511,7 @@ register char *s; if (s[0] == '\0') { (*dev->comout)( - "aa ab ad ar as av b dc di dj ds dt i lr lw ps pt sj st bv: "); + "aa ab ad ar as av b dc dv dj ds dt i lr lw me ma mg ms ps pt sj st bv: "); (*dev->comin)(buf, NULL); s = buf; } @@ -552,6 +556,7 @@ register char *s; getparam(s+2, "back face visibility", 'b', &backvis); break; case '\0': /* black and white */ + case ' ': case 'y': case 'Y': case 't': case 'T': case '1': case '+': case 'n': case 'N': case 'f': case 'F': case '0': case '-': getparam(s+1, "black and white", 'b', &greyscale); @@ -589,6 +594,26 @@ register char *s; goto badparam; } break; + case 'm': /* medium */ + switch (s[1]) { + case 'e': /* extinction coefficient */ + getparam(s+2, "extinction coefficient", 'C', + (COLOR *)cextinction); + break; + case 'a': /* scattering albedo */ + getparam(s+2, "scattering albedo", 'r', &salbedo); + break; + case 'g': /* scattering eccentricity */ + getparam(s+2, "scattering eccentricity", 'r', &seccg); + break; + case 's': /* sampling distance */ + getparam(s+2, "mist sampling distance", 'r', + &ssampdist); + break; + default: + goto badparam; + } + break; case 'p': /* pixel */ switch (s[1]) { case 's': /* sample */ @@ -637,7 +662,7 @@ char *s; thisray.rmax = 0.0; if (!sscanvec(s, thisray.rorg) || - !sscanvec(sskip(sskip(sskip(s))), thisray.rdir)) { + !sscanvec(sskip2(s,3), thisray.rdir)) { if (dev->getcur == NULL) return; @@ -674,8 +699,9 @@ char *s; if (thisray.rot >= FHUGE) (*dev->comout)("at infinity"); else { - sprintf(buf, "at (%.6g %.6g %.6g)", thisray.rop[0], - thisray.rop[1], thisray.rop[2]); + sprintf(buf, "at (%.6g %.6g %.6g) (%.6g)", + thisray.rop[0], thisray.rop[1], + thisray.rop[2], thisray.rt); (*dev->comout)(buf); } (*dev->comin)(buf, NULL);