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 1.4 by greg, Tue May 30 09:57:13 1989 UTC vs.
Revision 1.5 by greg, Wed Jun 7 08:35:26 1989 UTC

# Line 391 | Line 391 | register char  *s;
391          extern double  minweight;
392          extern int  maxdepth;
393          extern double  dstrsrc;
394 +        extern double  shadthresh;
395          extern COLOR  ambval;
396          extern double  ambacc;
397          extern double  minarad;
# Line 403 | Line 404 | register char  *s;
404          char  buf[128];
405          
406          if (s[0] == '\0') {
407 <                (*dev->comout)("aa ab ad ar as av ds lr lw sd sp: ");
407 >                (*dev->comout)("aa ab ad ar as av dj dt lr lw sd sp: ");
408                  (*dev->comin)(buf);
409                  s = buf;
410          }
# Line 436 | Line 437 | register char  *s;
437                          goto badparam;
438                  }
439                  break;
440 <        case 'd':                       /* distribute source */
441 <                if (s[1] != 's')
440 >        case 'd':                       /* direct */
441 >                switch (s[1]) {
442 >                case 'j':                       /* jitter */
443 >                        if (sscanf(s+2, "%lf", &d0) != 1) {
444 >                                sprintf(buf, "direct jitter (%.6g): ",
445 >                                                dstrsrc);
446 >                                (*dev->comout)(buf);
447 >                                (*dev->comin)(buf);
448 >                                if (sscanf(buf, "%lf", &d0) != 1)
449 >                                        break;
450 >                        }
451 >                        dstrsrc = d0;
452 >                        break;
453 >                case 't':                       /* threshold */
454 >                        if (sscanf(s+2, "%lf", &d0) != 1) {
455 >                                sprintf(buf, "direct threshold (%.6g): ",
456 >                                                shadthresh);
457 >                                (*dev->comout)(buf);
458 >                                (*dev->comin)(buf);
459 >                                if (sscanf(buf, "%lf", &d0) != 1)
460 >                                        break;
461 >                        }
462 >                        shadthresh = d0;
463 >                        break;
464 >                default:
465                          goto badparam;
442                if (sscanf(s+2, "%lf", &d0) != 1) {
443                        sprintf(buf, "distribute source (%.6g): ", dstrsrc);
444                        (*dev->comout)(buf);
445                        (*dev->comin)(buf);
446                        if (sscanf(buf, "%lf", &d0) != 1)
447                                break;
466                  }
449                dstrsrc = d0;
467                  break;
468          case 'a':                       /* ambient */
469                  switch (s[1]) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines