--- ray/src/rt/rv2.c 1995/03/21 14:40:14 2.30 +++ ray/src/rt/rv2.c 1996/04/17 14:02:12 2.35 @@ -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); } @@ -492,11 +492,16 @@ register char *s; extern double shadthresh; extern double shadcert; extern COLOR ambval; + extern int ambvwt; extern double ambacc; extern int ambres; extern int ambdiv; extern int ambssamp; extern int ambounce; + extern COLOR cextinction; + extern COLOR salbedo; + extern double seccg; + extern double ssampdist; extern int directvis; extern double srcsizerat; extern int do_irrad; @@ -507,7 +512,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 aw b dc dv dj ds dt i lr lw me ma mg ms ps pt sj st bv: "); (*dev->comin)(buf, NULL); s = buf; } @@ -569,6 +574,9 @@ register char *s; case 'v': /* value */ getparam(s+2, "ambient value", 'C', (COLOR *)ambval); break; + case 'w': /* weight */ + getparam(s+2, "ambient value weight", 'i', &ambvwt); + break; case 'a': /* accuracy */ if (getparam(s+2, "ambient accuracy", 'r', &ambacc)) setambacc(ambacc); @@ -590,6 +598,27 @@ 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", 'C', + (COLOR *)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 */ @@ -638,7 +667,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;