--- ray/src/rt/rv2.c 1995/12/08 21:27:34 2.32 +++ ray/src/rt/rv2.c 1997/03/07 16:58:58 2.36 @@ -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,13 +492,14 @@ 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 double salbedo; + extern COLOR salbedo; extern double seccg; extern double ssampdist; extern int directvis; @@ -511,7 +512,7 @@ register char *s; if (s[0] == '\0') { (*dev->comout)( - "aa ab ad ar as av b dc dv dj ds dt i lr lw me ma mg ms 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; } @@ -573,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); @@ -601,7 +605,8 @@ register char *s; (COLOR *)cextinction); break; case 'a': /* scattering albedo */ - getparam(s+2, "scattering albedo", 'r', &salbedo); + getparam(s+2, "scattering albedo", 'C', + (COLOR *)salbedo); break; case 'g': /* scattering eccentricity */ getparam(s+2, "scattering eccentricity", 'r', &seccg); @@ -657,12 +662,13 @@ char *s; { char buf[128]; int x, y; + OBJREC *inst; RAY thisray; 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; @@ -694,6 +700,9 @@ char *s; objptr(thisray.ro->omod)->oname, ofun[thisray.ro->otype].funame, thisray.ro->oname); + if ((inst = objptr(thisray.robj)) != thisray.ro) + sprintf(buf+strlen(buf), " in instance \"%s\"", + inst->oname); (*dev->comout)(buf); (*dev->comin)(buf, NULL); if (thisray.rot >= FHUGE)