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.21 by greg, Sat May 1 21:49:42 2010 UTC vs.
Revision 2.23 by greg, Fri Feb 18 00:40:25 2011 UTC

# Line 30 | Line 30 | typedef struct {
30  
31   static MESH     *mlist = NULL;          /* list of loaded meshes */
32  
33 static lut_keycmpf_t cvcmp;
34 static lut_hashf_t cvhash;
33  
36
34   static unsigned long
35 < cvhash(p)                               /* hash an encoded vertex */
39 < /* MCVERT       *cvp; */
40 < const void      *p;
35 > cvhash(const char *p)                   /* hash an encoded vertex */
36   {
37          const MCVERT    *cvp = (const MCVERT *)p;
38          unsigned long   hval;
# Line 54 | Line 49 | const void     *p;
49  
50  
51   static int
52 < cvcmp(vv1, vv2)                         /* compare encoded vertices */
58 < /* register MCVERT      *v1, *v2; */
59 < const void      *vv1, *vv2;
52 > cvcmp(const char *vv1, const char *vv2)         /* compare encoded vertices */
53   {
54 <        const MCVERT    *v1 = vv1, *v2 = vv2;
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 620 | 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