1 |
< |
/* Copyright (c) 1986 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 |
|
/* |
26 |
|
register RAY *r; |
27 |
|
{ |
28 |
|
OBJECT cset[MAXSET+1], *modset; |
29 |
+ |
OBJECT obj, mod; |
30 |
|
int entering; |
31 |
|
register int i; |
32 |
|
|
33 |
+ |
obj = objndx(m); |
34 |
|
if ((modset = (OBJECT *)m->os) == NULL) { |
33 |
– |
OBJECT obj, mod; |
34 |
– |
|
35 |
|
if (m->oargs.nsargs < 1 || m->oargs.nsargs > MAXSET) |
36 |
|
objerror(m, USER, "bad # arguments"); |
37 |
– |
obj = objndx(m); |
37 |
|
modset = (OBJECT *)malloc((m->oargs.nsargs+1)*sizeof(OBJECT)); |
38 |
|
if (modset == NULL) |
39 |
|
error(SYSTEM, "out of memory in m_clip"); |
89 |
|
inside--; |
90 |
|
if (inside > 0) { /* we just hit the object */ |
91 |
|
flipsurface(r); |
92 |
< |
return(rayshade(r, modifier(m->oargs.sarg[0]))); |
92 |
> |
return(rayshade(r, lastmod(obj, m->oargs.sarg[0]))); |
93 |
|
} |
94 |
|
} |
95 |
|
raytrans(r); /* else transfer ray */ |