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.17 by greg, Thu Feb 12 18:55:50 2004 UTC vs.
Revision 2.23 by greg, Fri Feb 18 00:40:25 2011 UTC

# Line 32 | Line 32 | static MESH    *mlist = NULL;          /* list of loaded meshes *
32  
33  
34   static unsigned long
35 < cvhash(cvp)                             /* hash an encoded vertex */
36 < MCVERT  *cvp;
35 > cvhash(const char *p)                   /* hash an encoded vertex */
36   {
37 +        const MCVERT    *cvp = (const MCVERT *)p;
38          unsigned long   hval;
39          
40          if (!(cvp->fl & MT_V))
# Line 49 | Line 49 | MCVERT *cvp;
49  
50  
51   static int
52 < cvcmp(v1, v2)                           /* compare encoded vertices */
53 < register MCVERT *v1, *v2;
52 > cvcmp(const char *vv1, const char *vv2)         /* compare encoded vertices */
53   {
54 +        const MCVERT    *v1 = (const MCVERT *)vv1, *v2 = (const MCVERT *)vv2;
55          if (v1->fl != v2->fl)
56                  return(1);
57          if (v1->xyz[0] != v2->xyz[0])
# Line 546 | Line 546 | register MESH  *mp;
546                                  if (nouvbounds && pp->uv != NULL)
547                                          return("unreferenced uv coordinates");
548                          }
549                        if (pp->ntris + pp->nj1tris + pp->nj2tris <= 0)
550                                error(WARNING, "no triangles in patch");
549                          if (pp->ntris > 0 && pp->tri == NULL)
550                                  return("missing patch triangle list");
551                          if (pp->nj1tris > 0 && pp->j1tri == NULL)
# Line 615 | Line 613 | FILE   *fp;
613                  t2cnt += pp->nj2tris;
614          }
615          fprintf(fp, "Mesh statistics:\n");
616 <        fprintf(fp, "\t%ld materials\n", ms->nmats);
616 >        fprintf(fp, "\t%ld materials\n", (long)ms->nmats);
617          fprintf(fp, "\t%d patches (%.2f MBytes)\n", ms->npatches,
618                          (ms->npatches*sizeof(MESHPATCH) +
619                          vcnt*3*sizeof(uint32) +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines