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.4 by greg, Wed Jun 7 08:40:59 1989 UTC vs.
Revision 1.5 by greg, Wed Jun 7 10:09:07 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();
45   extern int  m_dielectric();
46   extern int  m_interface();
47   extern int  text();
# Line 60 | Line 62 | FUN  ofun[] = {
62          { "instance", addxform },
63          { "alias", alias },
64          { "antimatter", passargs },
65 +        { "glow", m_glow },
66 +        { "spotlight", m_spot },
67          { "dielectric", m_dielectric },
68          { "interface", m_interface },
69          { "colortext", text },
# Line 76 | Line 80 | FUN  ofun[] = {
80          { "mixtext", text },
81          { "light", passargs },
82          { "illum", passargs },
79        { "glow", passargs },
83          { "plastic", passargs },
84          { "metal", passargs },
85          { "trans", passargs },
# Line 328 | Line 331 | FILE  *fin;
331          if (fscanf(fin, "%s", alias) != 1)
332                  return(-1);
333          printf("\t%s\n", alias);
334 +        return(0);
335 + }
336 +
337 +
338 + m_glow(fin)                     /* transform arguments for proximity light */
339 + FILE  *fin;
340 + {
341 +        register FUNARGS  *fa;
342 +
343 +        if ((fa = getfargs(fin)) == NULL)
344 +                return(-1);
345 +        if (fa->nsargs != 0 || fa->niargs != 0 || fa->nfargs != 4)
346 +                return(-1);
347 +        printf("0\n0\n4");
348 +        printf(" %18.12g %18.12g %18.12g",
349 +                        fa->farg[0], fa->farg[1], fa->farg[2]);
350 +        printf(" %18.12g\n", fa->farg[3] * totscale);
351 +        freefargs(fa);
352 +        return(0);
353 + }
354 +
355 +
356 + m_spot(fin)                     /* transform arguments for spotlight */
357 + FILE  *fin;
358 + {
359 +        double  v[3];
360 +        register FUNARGS  *fa;
361 +
362 +        if ((fa = getfargs(fin)) == NULL)
363 +                return(-1);
364 +        if (fa->nsargs != 0 || fa->niargs != 0 || fa->nfargs != 7)
365 +                return(-1);
366 +        printf("0\n0\n7");
367 +        printf(" %18.12g %18.12g %18.12g %18.12g\n",
368 +                        fa->farg[0], fa->farg[1], fa->farg[2], fa->farg[3]);
369 +        multv3(v, fa->farg+4, totxform);
370 +        printf("\t%18.12g %18.12g %18.12g\n", v[0], v[1], v[2]);
371 +        freefargs(fa);
372          return(0);
373   }
374  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines