ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rv2.c
(Generate patch)

Comparing ray/src/rt/rv2.c (file contents):
Revision 2.31 by greg, Thu May 4 15:50:26 1995 UTC vs.
Revision 2.37 by greg, Tue Mar 18 18:09:15 1997 UTC

# Line 1 | Line 1
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";
# Line 346 | Line 346 | register char  *s;
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   }
# Line 492 | Line 492 | register char  *s;
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 COLOR  salbedo;
503 +        extern double  seccg;
504 +        extern double  ssampdist;
505          extern int  directvis;
506          extern double  srcsizerat;
507          extern int  do_irrad;
# Line 507 | Line 512 | register char  *s;
512          
513          if (s[0] == '\0') {
514                  (*dev->comout)(
515 <                "aa ab ad ar as av b dc dv 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          }
# Line 569 | Line 574 | register char  *s;
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);
# Line 590 | Line 598 | register char  *s;
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", 'C',
609 +                                        (COLOR *)salbedo);
610 +                        break;
611 +                case 'g':                       /* scattering eccentricity */
612 +                        getparam(s+2, "scattering eccentricity", 'r', &seccg);
613 +                        break;
614 +                case 's':                       /* sampling distance */
615 +                        getparam(s+2, "mist sampling distance", 'r',
616 +                                        &ssampdist);
617 +                        break;
618 +                default:
619 +                        goto badparam;
620 +                }
621 +                break;
622          case 'p':                       /* pixel */
623                  switch (s[1]) {
624                  case 's':                       /* sample */
# Line 633 | Line 662 | char  *s;
662   {
663          char  buf[128];
664          int  x, y;
665 +        OBJREC  *ino;
666          RAY  thisray;
667  
668          thisray.rmax = 0.0;
669  
670          if (!sscanvec(s, thisray.rorg) ||
671 <                        !sscanvec(sskip(sskip(sskip(s))), thisray.rdir)) {
671 >                        !sscanvec(sskip2(s,3), thisray.rdir)) {
672  
673                  if (dev->getcur == NULL)
674                          return;
# Line 670 | Line 700 | char  *s;
700                                          objptr(thisray.ro->omod)->oname,
701                                  ofun[thisray.ro->otype].funame,
702                                  thisray.ro->oname);
703 +                if ((ino = objptr(thisray.robj)) != thisray.ro)
704 +                        sprintf(buf+strlen(buf), " in %s \"%s\"",
705 +                                        ofun[ino->otype].funame, ino->oname);
706                  (*dev->comout)(buf);
707                  (*dev->comin)(buf, NULL);
708                  if (thisray.rot >= FHUGE)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines