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

Comparing ray/src/cv/mgflib/parser.h (file contents):
Revision 1.12 by greg, Fri Jul 1 10:18:36 1994 UTC vs.
Revision 1.15 by greg, Thu Sep 1 09:17:46 1994 UTC

# Line 28 | Line 28
28   #define MG_E_RD         16
29   #define MG_E_RING       17
30   #define MG_E_RS         18
31 < #define MG_E_SPH        19
32 < #define MG_E_TD         20
33 < #define MG_E_TORUS      21
34 < #define MG_E_TS         22
35 < #define MG_E_VERTEX     23
36 < #define MG_E_XF         24
31 > #define MG_E_SIDES      19
32 > #define MG_E_SPH        20
33 > #define MG_E_TD         21
34 > #define MG_E_TORUS      22
35 > #define MG_E_TS         23
36 > #define MG_E_VERTEX     24
37 > #define MG_E_XF         25
38  
39 < #define MG_NENTITIES    25
39 > #define MG_NENTITIES    26
40  
41   #define MG_NAMELIST     {"#","c","cone","cmix","cspec","cxy","cyl","ed","f",\
42                          "i","ies","m","n","o","p","prism","rd","ring","rs",\
43 <                        "sph","td","torus","ts","v","xf"}
43 >                        "sides","sph","td","torus","ts","v","xf"}
44  
45   #define MG_MAXELEN      6
46  
# Line 83 | Line 84 | extern char    *mg_err[MG_NERRS];
84   * the mg_handle function rather than the mg_ehand routines directly.
85   * (The first argument to mg_handle is the entity #, or -1.)
86   * To free any data structures and clear the parser, use mg_clear.
87 < * If there is an error, mg_load, mg_open, mg_parse, and mg_rewind
88 < * will return an error from the list above.  In addition, mg_load
89 < * will report the error to stderr.  The mg_read routine returns 0
90 < * when the end of file has been reached.
87 > * If there is an error, mg_load, mg_open, mg_parse, mg_handle and
88 > * mg_rewind will return an error from the list above.  In addition,
89 > * mg_load will report the error to stderr.  The mg_read routine
90 > * returns 0 when the end of file has been reached.
91   */
92  
93   #define MG_MAXLINE      512             /* maximum input line length */
# Line 236 | Line 237 | typedef struct {
237                          11,8,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},\
238                          106770L, .167, .009 }
239  
240 < #define c_cval(c,l)     ((double)(c)->ssamp[((l)-C_MINWL)/C_CWLI] / (c)->sum)
240 > #define c_cval(c,l)     ((double)(c)->ssamp[((l)-C_MINWL)/C_CWLI] / (c)->ssum)
241  
242   typedef struct {
243          int     clock;          /* incremented each change -- resettable */
244 +        int     sided;          /* 1 if surface is 1-sided, 0 for 2-sided */
245          float   rd;             /* diffuse reflectance */
246          C_COLOR rd_c;           /* diffuse reflectance color */
247          float   td;             /* diffuse transmittance */
# Line 259 | Line 261 | typedef struct {
261          FVECT   p, n;           /* point and normal */
262   } C_VERTEX;             /* vertex context */
263  
264 < #define C_DEFMATERIAL   {1,0.,C_DEFCOLOR,0.,C_DEFCOLOR,0.,C_DEFCOLOR,\
264 > #define C_DEFMATERIAL   {1,0,0.,C_DEFCOLOR,0.,C_DEFCOLOR,0.,C_DEFCOLOR,\
265                                          0.,C_DEFCOLOR,0.,0.,C_DEFCOLOR,0.}
266   #define C_DEFVERTEX     {1,{0.,0.,0.},{0.,0.,0.}}
267  
# Line 328 | Line 330 | extern MAT4  m4ident;
330  
331                                  /* regular transformation */
332   typedef struct {
333 <        MAT4  xfm;                              /* transform matrix */
334 <        FLOAT  sca;                             /* scalefactor */
333 >        MAT4    xfm;                            /* transform matrix */
334 >        FLOAT   sca;                            /* scalefactor */
335   }  XF;
336  
337   #define identxf(xp)             (void)(setident4((xp)->xfm),(xp)->sca=1.0)
# Line 349 | Line 351 | typedef struct xf_spec {
351          long    xid;                    /* unique transform id */
352          short   xav0;                   /* zeroeth argument in xf_argv array */
353          short   xac;                    /* transform argument count */
354 +        short   rev;                    /* boolean true if vertices reversed */
355          XF      xf;                     /* cumulative transformation */
356          struct xf_array *xarr;          /* transformation array pointer */
357          struct xf_spec  *prev;          /* previous transformation context */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines