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

Comparing ray/src/rt/ambcomp.c (file contents):
Revision 2.10 by greg, Tue Feb 25 02:47:22 2003 UTC vs.
Revision 2.11 by schorsch, Mon Jul 21 22:30:19 2003 UTC

# Line 142 | Line 142 | FVECT  pg, dg;
142                  qsort(div, ndivs, sizeof(AMBSAMP), ambcmp);     /* sort divs */
143                                                  /* super-sample */
144                  for (i = ns; i > 0; i--) {
145 <                        copystruct(&dnew, div);
145 >                        dnew = *div;
146                          if (divsample(&dnew, &hemi, r) < 0)
147                                  goto oopsy;
148                                                          /* reinsert */
149                          dp = div;
150                          j = ndivs < i ? ndivs : i;
151                          while (--j > 0 && dnew.k < dp[1].k) {
152 <                                copystruct(dp, dp+1);
152 >                                *dp = *(dp+1);
153                                  dp++;
154                          }
155 <                        copystruct(dp, &dnew);
155 >                        *dp = dnew;
156                  }
157                  if (pg != NULL || dg != NULL)   /* restore order */
158                          qsort(div, ndivs, sizeof(AMBSAMP), ambnorm);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines