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

Comparing ray/src/rt/virtuals.c (file contents):
Revision 1.16 by greg, Thu Jul 11 16:43:38 1991 UTC vs.
Revision 1.17 by greg, Tue Jul 16 15:56:51 1991 UTC

# Line 104 | Line 104 | int  n;
104          for (i = 0; i < vsmat->nproj; i++)
105                  if ((*vsmat->vproj)(proj, o, &source[sn], i))
106                          if ((ns = makevsrc(o, sn, proj)) >= 0) {
107 +                                source[ns].sa.sv.pn = i;
108   #ifdef DEBUG
109                                  virtverb(ns, stderr);
110   #endif
# Line 134 | Line 135 | MAT4  pm;
135                  if (source[sn].sflags & SPROX)
136                          return(-1);             /* should never get here! */
137                  multv3(nsloc, source[sn].sloc, pm);
138 +                normalize(nsloc);
139                  VCOPY(ourspot.aim, ocent);
140                  ourspot.siz = PI*maxrad2;
141                  ourspot.flen = 0.;
# Line 169 | Line 171 | MAT4  pm;
171                  if (source[sn].sflags & SSPOT) {
172                          copystruct(&theirspot, source[sn].sl.s);
173                          multv3(theirspot.aim, source[sn].sl.s->aim, pm);
174 +                        normalize(theirspot.aim);
175                          if (nsflags & SSPOT) {
176                                  ourspot.flen = theirspot.flen;
177                                  d = ourspot.siz;
# Line 191 | Line 194 | MAT4  pm;
194                  }
195                  if (source[sn].sflags & SFLAT) {        /* behind source? */
196                          multv3(nsnorm, source[sn].snorm, pm);
197 +                        normalize(nsnorm);
198                          if (!checkspot(&ourspot, nsnorm))
199                                  return(-1);
200                  }
# Line 214 | Line 218 | MAT4  pm;
218          }
219          if (nsflags & SPROX)
220                  source[i].sl.prox = source[sn].sl.prox;
221 <        source[i].sa.svnext = sn;
221 >        source[i].sa.sv.sn = sn;
222          source[i].so = op;
223          return(i);
224   memerr:
# Line 372 | Line 376 | FILE  *fp;
376          fprintf(fp, "\tat (%f,%f,%f)\n",
377                  source[sn].sloc[0], source[sn].sloc[1], source[sn].sloc[2]);
378          fprintf(fp, "\tlinked to source %d (%s)\n",
379 <                source[sn].sa.svnext, source[source[sn].sa.svnext].so->oname);
379 >                source[sn].sa.sv.sn, source[source[sn].sa.sv.sn].so->oname);
380          if (source[sn].sflags & SFOLLOW)
381                  fprintf(fp, "\talways followed\n");
382          else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines