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

Comparing ray/src/rt/m_clip.c (file contents):
Revision 2.1 by greg, Tue Nov 12 17:08:41 1991 UTC vs.
Revision 2.4 by gwlarson, Mon Aug 10 18:38:56 1998 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
1 > /* Copyright (c) 1998 Silicon Graphics, Inc. */
2  
3   #ifndef lint
4 < static char SCCSid[] = "$SunId$ LBL";
4 > static char SCCSid[] = "$SunId$ SGI";
5   #endif
6  
7   /*
# Line 26 | Line 26 | register OBJREC  *m;
26   register RAY  *r;
27   {
28          OBJECT  cset[MAXSET+1], *modset;
29 +        OBJECT  obj, mod;
30          int  entering;
31          register int  i;
32  
33 +        obj = objndx(m);
34          if ((modset = (OBJECT *)m->os) == NULL) {
33                register OBJECT  mod;
34
35                  if (m->oargs.nsargs < 1 || m->oargs.nsargs > MAXSET)
36                          objerror(m, USER, "bad # arguments");
37                  modset = (OBJECT *)malloc((m->oargs.nsargs+1)*sizeof(OBJECT));
# Line 41 | Line 41 | register RAY  *r;
41                  for (i = 0; i < m->oargs.nsargs; i++) {
42                          if (!strcmp(m->oargs.sarg[i], VOIDID))
43                                  continue;
44 <                        if ((mod = modifier(m->oargs.sarg[i])) == OVOID) {
44 >                        if ((mod = lastmod(obj, m->oargs.sarg[i])) == OVOID) {
45                                  sprintf(errmsg, "unknown modifier \"%s\"",
46                                                  m->oargs.sarg[i]);
47                                  objerror(m, WARNING, errmsg);
# Line 89 | Line 89 | register RAY  *r;
89                                          inside--;
90                  if (inside > 0) {       /* we just hit the object */
91                          flipsurface(r);
92 <                        rayshade(r, modifier(m->oargs.sarg[0]));
93 <                        return;
92 >                        return(rayshade(r, lastmod(obj, m->oargs.sarg[0])));
93                  }
94          }
95          raytrans(r);                    /* else transfer ray */
96 +        return(1);
97   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines