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

Comparing ray/src/rt/rtrace.c (file contents):
Revision 2.8 by greg, Thu Oct 15 21:13:21 1992 UTC vs.
Revision 2.9 by greg, Fri Nov 6 16:48:32 1992 UTC

# Line 73 | Line 73 | extern OBJREC  Lamb;                   /* a Lambertian surface */
73   static RAY  thisray;                    /* for our convenience */
74  
75   static int  oputo(), oputd(), oputv(), oputl(), oputL(),
76 <                oputp(), oputn(), oputs(), oputw(), oputm();
76 >                oputp(), oputn(), oputN(), oputs(), oputw(), oputm();
77  
78   static int  (*ray_out[10])(), (*every_out[10])();
79   static int  castonly;
# Line 202 | Line 202 | register char  *vs;
202                  case 'p':                               /* point */
203                          *table++ = oputp;
204                          break;
205 <                case 'n':                               /* normal */
205 >                case 'n':                               /* perturbed normal */
206                          *table++ = oputn;
207 +                        castonly = 0;
208                          break;
209 +                case 'N':                               /* unperturbed normal */
210 +                        *table++ = oputN;
211 +                        break;
212                  case 's':                               /* surface */
213                          *table++ = oputs;
214                          break;
# Line 400 | Line 404 | register RAY  *r;
404  
405  
406   static
407 < oputn(r)                                /* print normal */
407 > oputN(r)                                /* print unperturbed normal */
408   register RAY  *r;
409   {
410          if (r->rot < FHUGE) {
# Line 412 | Line 416 | register RAY  *r;
416                  (*putreal)(0.0);
417                  (*putreal)(0.0);
418          }
419 + }
420 +
421 +
422 + static
423 + oputn(r)                                /* print perturbed normal */
424 + RAY  *r;
425 + {
426 +        FVECT  pnorm;
427 +
428 +        if (r->rot >= FHUGE) {
429 +                (*putreal)(0.0);
430 +                (*putreal)(0.0);
431 +                (*putreal)(0.0);
432 +                return;
433 +        }
434 +        raynormal(pnorm, r);
435 +        (*putreal)(pnorm[0]);
436 +        (*putreal)(pnorm[1]);
437 +        (*putreal)(pnorm[2]);
438   }
439  
440  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines