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.28 by greg, Tue Feb 25 02:47:23 2003 UTC vs.
Revision 2.31 by schorsch, Mon Jun 30 14:59:12 2003 UTC

# Line 21 | Line 21 | static const char      RCSid[] = "$Id$";
21   *  irradiance values are desired.
22   */
23  
24 + #include  "platform.h"
25   #include  "ray.h"
25
26   #include  "otypes.h"
27
27   #include  "resolu.h"
28  
29   CUBE  thescene;                         /* our scene */
# Line 90 | Line 89 | int  ambincl = -1;                     /* include == 1, exclude == 0 */
89  
90   static RAY  thisray;                    /* for our convenience */
91  
92 < static void  oputo(), oputd(), oputv(), oputl(), oputL(),
92 > static void  oputo(), oputd(), oputv(), oputl(), oputL(), oputc(),
93                  oputp(), oputn(), oputN(), oputs(), oputw(), oputm();
94  
95   static void  ourtrace(), tabin();
# Line 108 | Line 107 | void
107   quit(code)                      /* quit program */
108   int  code;
109   {
110 < #ifndef  NIX
110 > #ifndef  NON_POSIX /* XXX we don't clean up elsewhere? */
111          headclean();            /* delete header file */
112          pfclean();              /* clean up persist files */
113   #endif
# Line 146 | Line 145 | char  *fname;
145                  sprintf(errmsg, "cannot open input file \"%s\"", fname);
146                  error(SYSTEM, errmsg);
147          }
148 < #ifdef MSDOS
148 > #ifdef _WIN32
149          if (inform != 'a')
150 <                setmode(fileno(fp), O_BINARY);
150 >                SET_FILE_BINARY(fp);
151   #endif
152                                          /* set up output */
153          setoutput(outvals);
# Line 234 | Line 233 | register char  *vs;
233                          *table++ = oputl;
234                          castonly = 0;
235                          break;
236 +                case 'c':                               /* local coordinates */
237 +                        *table++ = oputc;
238 +                        break;
239                  case 'L':                               /* single ray length */
240                          *table++ = oputL;
241                          break;
# Line 429 | Line 431 | RAY  *r;
431  
432   static void
433   oputo(r)                                /* print origin */
434 < register RAY  *r;
434 > RAY  *r;
435   {
436          (*putreal)(r->rorg[0]);
437          (*putreal)(r->rorg[1]);
# Line 439 | Line 441 | register RAY  *r;
441  
442   static void
443   oputd(r)                                /* print direction */
444 < register RAY  *r;
444 > RAY  *r;
445   {
446          (*putreal)(r->rdir[0]);
447          (*putreal)(r->rdir[1]);
# Line 449 | Line 451 | register RAY  *r;
451  
452   static void
453   oputv(r)                                /* print value */
454 < register RAY  *r;
454 > RAY  *r;
455   {
456          COLR  cout;
457          
# Line 468 | Line 470 | register RAY  *r;
470  
471   static void
472   oputl(r)                                /* print effective distance */
473 < register RAY  *r;
473 > RAY  *r;
474   {
475          (*putreal)(r->rt);
476   }
# Line 476 | Line 478 | register RAY  *r;
478  
479   static void
480   oputL(r)                                /* print single ray length */
481 < register RAY  *r;
481 > RAY  *r;
482   {
483          (*putreal)(r->rot);
484   }
485  
486  
487   static void
488 + oputc(r)                                /* print local coordinates */
489 + RAY  *r;
490 + {
491 +        (*putreal)(r->uv[0]);
492 +        (*putreal)(r->uv[1]);
493 + }
494 +
495 +
496 + static void
497   oputp(r)                                /* print point */
498 < register RAY  *r;
498 > RAY  *r;
499   {
500          if (r->rot < FHUGE) {
501                  (*putreal)(r->rop[0]);
# Line 500 | Line 511 | register RAY  *r;
511  
512   static void
513   oputN(r)                                /* print unperturbed normal */
514 < register RAY  *r;
514 > RAY  *r;
515   {
516          if (r->rot < FHUGE) {
517                  (*putreal)(r->ron[0]);
# Line 535 | Line 546 | RAY  *r;
546  
547   static void
548   oputs(r)                                /* print name */
549 < register RAY  *r;
549 > RAY  *r;
550   {
551          if (r->ro != NULL)
552                  fputs(r->ro->oname, stdout);
# Line 547 | Line 558 | register RAY  *r;
558  
559   static void
560   oputw(r)                                /* print weight */
561 < register RAY  *r;
561 > RAY  *r;
562   {
563          (*putreal)(r->rweight);
564   }
# Line 555 | Line 566 | register RAY  *r;
566  
567   static void
568   oputm(r)                                /* print modifier */
569 < register RAY  *r;
569 > RAY  *r;
570   {
571          if (r->ro != NULL)
572                  if (r->ro->omod != OVOID)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines