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

Comparing ray/src/common/instance.c (file contents):
Revision 1.3 by greg, Thu Jul 27 22:25:56 1989 UTC vs.
Revision 1.7 by greg, Wed May 29 17:11:32 1991 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1988 Regents of the University of California */
1 > /* Copyright (c) 1990 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 28 | Line 28 | int  flags;
28          char  *pathname;
29          register SCENE  *sc;
30  
31 <        flags &= ~IO_FILES;                     /* not allowed */
31 >        flags &= ~(IO_FILES|IO_INFO);           /* not allowed */
32          for (sc = slist; sc != NULL; sc = sc->next)
33                  if (!strcmp(sname, sc->name)) {
34                          if ((sc->ldflags & flags) == flags)
# Line 66 | Line 66 | int  flags;
66                          error(SYSTEM, "out of memory in getinstance");
67                  if (o->oargs.nsargs < 1)
68                          objerror(o, USER, "bad # of arguments");
69 <                in->f.sca = 1.0;
70 <                setident4(in->f.xfm);
71 <                if (xf(in->f.xfm, &in->f.sca, o->oargs.nsargs-1,
69 >                if (fullxf(&in->x, o->oargs.nsargs-1,
70                                  o->oargs.sarg+1) != o->oargs.nsargs-1)
71                          objerror(o, USER, "bad transform");
72 <                if (in->f.sca < 0.0)
73 <                        in->f.sca = -in->f.sca;
74 <                in->b.sca = 1.0;
75 <                setident4(in->b.xfm);
78 <                invxf(in->b.xfm, &in->b.sca,o->oargs.nsargs-1,o->oargs.sarg+1);
79 <                if (in->b.sca < 0.0)
80 <                        in->b.sca = -in->b.sca;
72 >                if (in->x.f.sca < 0.0)
73 >                        in->x.f.sca = -in->x.f.sca;
74 >                if (in->x.b.sca < 0.0)
75 >                        in->x.b.sca = -in->x.b.sca;
76                  in->obj = NULL;
77                  o->os = (char *)in;
78          }
79          if (in->obj == NULL || (in->obj->ldflags & flags) != flags)
80                  in->obj = getscene(o->oargs.sarg[0], flags);
81          return(in);
82 + }
83 +
84 +
85 + freeinstance(o)         /* free memory associated with instance */
86 + OBJREC  *o;
87 + {
88 +        free(o->os);
89   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines