ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/xform.c
(Generate patch)

Comparing ray/src/gen/xform.c (file contents):
Revision 1.2 by greg, Tue Mar 14 11:36:59 1989 UTC vs.
Revision 1.4 by greg, Wed Jun 7 08:40:59 1989 UTC

# Line 40 | Line 40 | extern int  o_face();
40   extern int  o_cone();
41   extern int  o_cylinder();
42   extern int  o_ring();
43 extern int  m_glow();
44 extern int  m_spot();
43   extern int  m_dielectric();
44   extern int  m_interface();
45   extern int  text();
# Line 62 | Line 60 | FUN  ofun[] = {
60          { "instance", addxform },
61          { "alias", alias },
62          { "antimatter", passargs },
65        { "glow", m_glow },
66        { "spotlight", m_spot },
63          { "dielectric", m_dielectric },
64          { "interface", m_interface },
65          { "colortext", text },
# Line 80 | Line 76 | FUN  ofun[] = {
76          { "mixtext", text },
77          { "light", passargs },
78          { "illum", passargs },
79 +        { "glow", passargs },
80          { "plastic", passargs },
81          { "metal", passargs },
82          { "trans", passargs },
# Line 208 | Line 205 | FILE  *fin;
205          FILE  *pin;
206          char  buf[512];
207  
211        buf[0] = '\0';
208          fgets(buf, sizeof(buf), fin);
209 <        if (buf[0] && buf[strlen(buf)-1] == '\n')
209 >        if (buf[strlen(buf)-1] == '\n')
210                  buf[strlen(buf)-1] = '\0';
211          if ((pin = popen(buf+1, "r")) == NULL) {
212                  fprintf(stderr, "%s: (%s): cannot execute \"%s\"\n",
# Line 332 | Line 328 | FILE  *fin;
328          if (fscanf(fin, "%s", alias) != 1)
329                  return(-1);
330          printf("\t%s\n", alias);
335        return(0);
336 }
337
338
339 m_glow(fin)                     /* transform arguments for proximity light */
340 FILE  *fin;
341 {
342        register FUNARGS  *fa;
343
344        if ((fa = getfargs(fin)) == NULL)
345                return(-1);
346        if (fa->nsargs != 0 || fa->niargs != 0 || fa->nfargs != 4)
347                return(-1);
348        printf("0\n0\n4");
349        printf(" %18.12g %18.12g %18.12g",
350                        fa->farg[0], fa->farg[1], fa->farg[2]);
351        printf(" %18.12g\n", fa->farg[3] * totscale);
352        freefargs(fa);
353        return(0);
354 }
355
356
357 m_spot(fin)                     /* transform arguments for spotlight */
358 FILE  *fin;
359 {
360        double  v[3];
361        register FUNARGS  *fa;
362
363        if ((fa = getfargs(fin)) == NULL)
364                return(-1);
365        if (fa->nsargs != 0 || fa->niargs != 0 || fa->nfargs != 7)
366                return(-1);
367        printf("0\n0\n7");
368        printf(" %18.12g %18.12g %18.12g %18.12g\n",
369                        fa->farg[0], fa->farg[1], fa->farg[2], fa->farg[3]);
370        multv3(v, fa->farg+4, totxform);
371        printf("\t%18.12g %18.12g %18.12g\n", v[0], v[1], v[2]);
372        freefargs(fa);
331          return(0);
332   }
333  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines