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

Comparing ray/src/cv/ies2rad.c (file contents):
Revision 2.14 by greg, Tue Jun 18 21:28:52 1996 UTC vs.
Revision 2.15 by gregl, Fri Jul 25 11:18:18 1997 UTC

# Line 714 | Line 714 | FILE   *fp;
714   char    *mod, *name;
715   int     dolower, doupper;
716   {
717 +        int     dosides = 0;
718          char    buf[MAXWORD];
719          
720          fprintf(fp, "\n%s %s %s_light\n", mod,
# Line 724 | Line 725 | int    dolower, doupper;
725                          lampcolor[1]/shp->area,
726                          lampcolor[2]/shp->area);
727          if (doupper && dolower && shp->type != SPHERE && shp->h > MINDIM)
728 <                if (shp->isillum) {
728 <                        fprintf(fp, "\nvoid illum %s_glow\n", name);
729 <                        fprintf(fp, "0\n0\n3 0 0 0\n");
730 <                } else {
728 >                if (!shp->isillum) {
729                          fprintf(fp, "\n%s glow %s_glow\n", mod, name);
730                          fprintf(fp, "0\n0\n4 %g %g %g -1\n",
731                                          lampcolor[0]/shp->area,
732                                          lampcolor[1]/shp->area,
733                                          lampcolor[2]/shp->area);
734 +                        dosides++;
735                  }
736          switch (shp->type) {
737          case RECT:
# Line 741 | Line 740 | int    dolower, doupper;
740                          putrectsrc(shp, fp, buf, name, 0);
741                  if (doupper)
742                          putrectsrc(shp, fp, buf, name, 1);
743 <                if (doupper && dolower && shp->h > MINDIM) {
743 >                if (dosides) {
744                          strcat(strcpy(buf, name), "_glow");
745                          putsides(shp, fp, buf, name);
746                  }
# Line 752 | Line 751 | int    dolower, doupper;
751                          putdisksrc(shp, fp, buf, name, 0);
752                  if (doupper)
753                          putdisksrc(shp, fp, buf, name, 1);
754 <                if (doupper && dolower && shp->h > MINDIM) {
754 >                if (dosides) {
755                          strcat(strcpy(buf, name), "_glow");
756                          putcyl(shp, fp, buf, name);
757                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines