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.4 by gwlarson, Mon Aug 10 18:38:56 1998 UTC vs.
Revision 2.7 by schorsch, Mon Jul 21 22:30:19 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1998 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  m_clip.c - routine for clipped (cut) objects.
9 *
10 *     3/17/86
6   */
7  
8 + #include "copyright.h"
9 +
10   #include  "ray.h"
11  
12   /*
# Line 21 | Line 18 | static char SCCSid[] = "$SunId$ SGI";
18   */
19  
20  
21 + int
22   m_clip(m, r)                    /* clip objects from ray */
23   register OBJREC  *m;
24   register RAY  *r;
# Line 82 | Line 80 | register RAY  *r;
80                                          /* check for penetration */
81                  for (rp = r; rp->parent != NULL; rp = rp->parent)
82                          if (!(rp->rtype & RAYREFL) && rp->parent->ro != NULL
83 <                                        && inset(modset, rp->parent->ro->omod))
83 >                                        && inset(modset, rp->parent->ro->omod)) {
84                                  if (rp->parent->rod > 0.0)
85                                          inside++;
86                                  else
87                                          inside--;
88 +                        }
89                  if (inside > 0) {       /* we just hit the object */
90                          flipsurface(r);
91                          return(rayshade(r, lastmod(obj, m->oargs.sarg[0])));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines