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

Comparing ray/src/rt/mx_data.c (file contents):
Revision 2.2 by greg, Mon Nov 25 09:50:51 1991 UTC vs.
Revision 2.4 by gwlarson, Mon Aug 10 18:35:14 1998 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1998 Silicon Graphics, Inc. */
2  
3   #ifndef lint
4 < static char SCCSid[] = "$SunId$ LBL";
4 > static char SCCSid[] = "$SunId$ SGI";
5   #endif
6  
7   /*
# Line 39 | Line 39 | mx_data(m, r)                  /* interpolate mixture data */
39   register OBJREC  *m;
40   RAY  *r;
41   {
42 +        OBJECT  obj;
43          double  coef;
44          double  pt[MAXDIM];
45          DATARRAY  *dp;
# Line 48 | Line 49 | RAY  *r;
49  
50          if (m->oargs.nsargs < 6)
51                  objerror(m, USER, "bad # arguments");
52 +        obj = objndx(m);
53          for (i = 0; i < 2; i++)
54                  if (!strcmp(m->oargs.sarg[i], VOIDID))
55                          mod[i] = OVOID;
56 <                else if ((mod[i] = modifier(m->oargs.sarg[i])) == OVOID) {
56 >                else if ((mod[i] = lastmod(obj, m->oargs.sarg[i])) == OVOID) {
57                          sprintf(errmsg, "undefined modifier \"%s\"",
58                                          m->oargs.sarg[i]);
59                          objerror(m, USER, errmsg);
# Line 71 | Line 73 | RAY  *r;
73          coef = funvalue(m->oargs.sarg[2], 1, &coef);
74          if (errno)
75                  goto computerr;
76 <        raymixture(r, mod[0], mod[1], coef);
77 <        return;
76 >        if (raymixture(r, mod[0], mod[1], coef)) {
77 >                if (m->omod != OVOID)
78 >                        objerror(m, USER, "inappropriate modifier");
79 >                return(1);
80 >        }
81 >        return(0);
82   computerr:
83          objerror(m, WARNING, "compute error");
84 +        return(0);
85   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines