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

Comparing ray/src/common/mesh.h (file contents):
Revision 2.5 by schorsch, Fri Jun 6 16:38:47 2003 UTC vs.
Revision 2.8 by greg, Fri Jun 27 06:53:21 2003 UTC

# Line 10 | Line 10
10   extern "C" {
11   #endif
12  
13 #include "copyright.h"
14
13   #include "lookup.h"
14  
17 #ifndef uint4
18 #define uint4   unsigned int4
19 #endif
15   #ifndef BYTE
16   #define BYTE    unsigned char
17   #endif
# Line 52 | Line 47 | extern "C" {
47  
48   /* A triangle mesh patch */
49   typedef struct {
50 <        uint4           (*xyz)[3];      /* up to 256 patch vertices */
51 <        int4            *norm;          /* vertex normals */
52 <        uint4           (*uv)[2];       /* vertex local coordinates */
50 >        uint32          (*xyz)[3];      /* up to 256 patch vertices */
51 >        int32           *norm;          /* vertex normals */
52 >        uint32          (*uv)[2];       /* vertex local coordinates */
53          struct PTri {
54                  BYTE            v1, v2, v3;     /* local vertices */
55          }               *tri;           /* local triangles */
56          short           solemat;        /* sole material */
57 <        int2            *trimat;        /* or local material indices */
57 >        int16           *trimat;        /* or local material indices */
58          struct PJoin1 {
59 <                int4            v1j;            /* non-local vertex */
60 <                int2            mat;            /* material index */
59 >                int32           v1j;            /* non-local vertex */
60 >                int16           mat;            /* material index */
61                  BYTE            v2, v3;         /* local vertices */
62          }               *j1tri;         /* joiner triangles */
63          struct PJoin2 {
64 <                int4            v1j, v2j;       /* non-local vertices */
65 <                int2            mat;            /* material index */
64 >                int32           v1j, v2j;       /* non-local vertices */
65 >                int16           mat;            /* material index */
66                  BYTE            v3;             /* local vertex */
67          }               *j2tri;         /* double joiner triangles */
68          short           nverts;         /* vertex count */
# Line 82 | Line 77 | typedef struct mesh {
77          int             nref;           /* reference count */
78          int             ldflags;        /* what we've loaded */
79          CUBE            mcube;          /* bounds and octree */
80 <        FLOAT           uvlim[2][2];    /* local coordinate extrema */
80 >        RREAL           uvlim[2][2];    /* local coordinate extrema */
81          OBJECT          mat0;           /* base material index */
82          OBJECT          nmats;          /* number of materials */
83          MESHPATCH       *patch;         /* mesh patch list */
# Line 109 | Line 104 | typedef struct {
104          int             fl;             /* setting flags */
105          FVECT           v;              /* vertex location */
106          FVECT           n;              /* vertex normal */
107 <        FLOAT           uv[2];          /* local coordinates */
107 >        RREAL           uv[2];          /* local coordinates */
108   } MESHVERT;
109  
110                                  /* mesh format identifier */
# Line 120 | Line 115 | typedef struct {
115  
116   extern MESH     *getmesh(char *mname, int flags);
117   extern MESHINST *getmeshinst(OBJREC *o, int flags);
118 < extern int      getmeshtrivid(int4 tvid[3], OBJECT *mo,
118 > extern int      getmeshtrivid(int32 tvid[3], OBJECT *mo,
119                                  MESH *mp, OBJECT ti);
120 < extern int      getmeshvert(MESHVERT *vp, MESH *mp, int4 vid, int what);
120 > extern int      getmeshvert(MESHVERT *vp, MESH *mp, int32 vid, int what);
121   extern int      getmeshtri(MESHVERT tv[3], OBJECT *mo,
122                                  MESH *mp, OBJECT ti, int what);
123   extern OBJREC   *getmeshpseudo(MESH *mp, OBJECT mo);
124 < extern int4     addmeshvert(MESH *mp, MESHVERT *vp);
124 > extern int32    addmeshvert(MESH *mp, MESHVERT *vp);
125   extern OBJECT   addmeshtri(MESH *mp, MESHVERT tv[3], OBJECT mo);
126   extern char     *checkmesh(MESH *mp);
127   extern void     printmeshstats(MESH *ms, FILE *fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines