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

Comparing ray/src/rt/m_mist.c (file contents):
Revision 2.5 by greg, Thu Mar 21 10:24:59 1996 UTC vs.
Revision 2.6 by greg, Wed Apr 17 14:10:23 1996 UTC

# Line 33 | Line 33 | static char SCCSid[] = "$SunId$ LBL";
33   *
34   *  Up to five real arguments may be given for MAT_MIST:
35   *
36 < *      [ext_r  ext_g  ext_b  [albedo [gecc]]]
36 > *      [ext_r  ext_g  ext_b  [albedo_r albedo_g albedo_b [gecc]]]
37   *
38   *  The primaries indicate medium extinction per unit length (absorption
39   *  plus scattering), which is added to the global extinction coefficient, set
# Line 47 | Line 47 | static char SCCSid[] = "$SunId$ LBL";
47   #define RELAYDELIM      '>'             /* relay delimiter character */
48  
49   extern COLOR  cextinction;              /* global coefficient of extinction */
50 < extern double  salbedo;                 /* global scattering albedo */
50 > extern COLOR  salbedo;                  /* global scattering albedo */
51   extern double  seccg;                   /* global scattering eccentricity */
52  
53  
# Line 166 | Line 166 | register RAY  *r;
166                  p.slights[0] = 0;
167          if (r->rod > 0.) {                      /* entering ray */
168                  addcolor(p.cext, mext);
169 <                if (m->oargs.nfargs > 3)
170 <                        p.albedo = m->oargs.farg[3];
171 <                if (m->oargs.nfargs > 4)
172 <                        p.gecc = m->oargs.farg[4];
169 >                if (m->oargs.nfargs > 5)
170 >                        setcolor(p.albedo, m->oargs.farg[3],
171 >                                        m->oargs.farg[4], m->oargs.farg[5]);
172 >                if (m->oargs.nfargs > 6)
173 >                        p.gecc = m->oargs.farg[6];
174                  add2slist(&p, myslist);                 /* add to list */
175          } else {                                /* leaving ray */
176                  if (myslist != NULL) {                  /* delete from list */
# Line 181 | Line 182 | register RAY  *r;
182                                          p.slights[++i] = p.slights[j];
183                          if (p.slights[0] - i < myslist[0]) {    /* fix old */
184                                  addcolor(r->cext, mext);
185 <                                if (m->oargs.nfargs > 3)
186 <                                        r->albedo = m->oargs.farg[3];
187 <                                if (m->oargs.nfargs > 4)
188 <                                        r->gecc = m->oargs.farg[4];
185 >                                if (m->oargs.nfargs > 5)
186 >                                        setcolor(r->albedo, m->oargs.farg[3],
187 >                                        m->oargs.farg[4], m->oargs.farg[5]);
188 >                                if (m->oargs.nfargs > 6)
189 >                                        r->gecc = m->oargs.farg[6];
190                                  add2slist(r, myslist);
191                          }
192                          p.slights[0] = i;
# Line 199 | Line 201 | register RAY  *r;
201                                  colval(cextinction,BLU))
202                          be = colval(cextinction,BLU);
203                  setcolor(p.cext, re, ge, be);
204 <                if (m->oargs.nfargs > 3)
205 <                        p.albedo = salbedo;
206 <                if (m->oargs.nfargs > 4)
204 >                if (m->oargs.nfargs > 5)
205 >                        copycolor(p.albedo, salbedo);
206 >                if (m->oargs.nfargs > 6)
207                          p.gecc = seccg;
208          }
209          rayvalue(&p);                           /* calls rayparticipate() */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines