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.31 by greg, Tue Nov 27 06:20:37 2018 UTC vs.
Revision 2.34 by greg, Tue Jul 14 23:13:50 2020 UTC

# Line 5 | Line 5 | static const char RCSid[] = "$Id$";
5   * Mesh support routines
6   */
7  
8 #include <string.h>
9
8   #include "rtio.h"
9   #include "rtmath.h"
10   #include "rterror.h"
# Line 511 | Line 509 | addmeshtri(                    /* add a new mesh triangle */
509          }
510                                                  /* double link */
511          pp = &mp->patch[pn[i=0]];
512 <        if (pp->nj2tris >= 256)
512 >        if (mp->patch[pn[1]].nj2tris < pp->nj2tris)
513                  pp = &mp->patch[pn[i=1]];
514 <        if (pp->nj2tris >= 256)
514 >        if (mp->patch[pn[2]].nj2tris < pp->nj2tris)
515                  pp = &mp->patch[pn[i=2]];
516          if (pp->nj2tris >= 256)
517                  error(INTERNAL, "too many patch triangles in addmeshtri");
# Line 580 | Line 578 | checkmesh(MESH *mp)                    /* validate mesh data */
578                          return("unbounded scene in mesh");
579                  if (mp->mat0 < 0 || mp->mat0+mp->nmats > nobjects)
580                          return("bad mesh modifier range");
581 +                if (mp->nmats > 0)      /* allocate during preload_objs()! */
582 +                        getmeshpseudo(mp, mp->mat0);
583                  for (i = mp->mat0+mp->nmats; i-- > mp->mat0; ) {
584                          int     otyp = objptr(i)->otype;
585                          if (!ismodifier(otyp)) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines