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

Comparing ray/src/common/mesh.c (file contents):
Revision 2.12 by schorsch, Thu Jul 17 09:21:29 2003 UTC vs.
Revision 2.17 by greg, Thu Feb 12 18:55:50 2004 UTC

# Line 7 | Line 7 | static const char RCSid[] = "$Id$";
7  
8   #include <string.h>
9  
10 < #include "standard.h"
10 > #include "rtio.h"
11 > #include "rtmath.h"
12 > #include "rterror.h"
13 > #include "paths.h"
14   #include "octree.h"
15   #include "object.h"
16   #include "otypes.h"
# Line 306 | Line 309 | MESHVERT       *vp;
309                                  (vp->v[i] - mp->mcube.cuorg[i]) /
310                                  mp->mcube.cusize);
311          }
312 <        if (vp->fl & MT_N)
312 >        if (vp->fl & MT_N)              /* assumes normalized! */
313                  cv.norm = encodedir(vp->n);
314          if (vp->fl & MT_UV)
315                  for (i = 0; i < 2; i++) {
# Line 410 | Line 413 | OBJECT         mo;
413                  pn[i] = vid[i] >> 8;
414          }
415                                  /* normalize material index */
416 <        if (mo != OVOID)
416 >        if (mo != OVOID) {
417                  if ((mo -= mp->mat0) >= mp->nmats)
418                          mp->nmats = mo+1;
419                  else if (mo < 0)
420                          error(INTERNAL, "modifier range error in addmeshtri");
421 +        }
422                                  /* assign triangle */
423          if (pn[0] == pn[1] && pn[1] == pn[2]) { /* local case */
424                  pp = &mp->patch[pn[0]];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines