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

Comparing ray/src/gen/mkillum2.c (file contents):
Revision 2.35 by greg, Fri Sep 3 23:53:50 2010 UTC vs.
Revision 2.36 by greg, Mon Aug 15 19:48:06 2011 UTC

# Line 29 | Line 29 | newdist(                       /* allocate & clear distribution array */
29   {
30          if (siz <= 0) {
31                  if (distsiz > 0)
32 <                        free((void *)distarr);
32 >                        free(distarr);
33                  distarr = NULL;
34                  distsiz = 0;
35                  return;
36          }
37          if (distsiz < siz) {
38                  if (distsiz > 0)
39 <                        free((void *)distarr);
39 >                        free(distarr);
40                  distarr = (COLORV *)malloc(sizeof(COLOR)*siz);
41                  if (distarr == NULL)
42                          error(SYSTEM, "out of memory in newdist");
# Line 62 | Line 62 | done_discount()                        /* clear off direct contrib. record
62   {
63          if (direct_discount == NULL)
64                  return;
65 <        free((void *)direct_discount);
65 >        free(direct_discount);
66          direct_discount = NULL;
67   }
68  
# Line 108 | Line 108 | raysamp(                       /* queue a ray sample */
108          VCOPY(myRay.rorg, org);
109          VCOPY(myRay.rdir, dir);
110          myRay.rmax = .0;
111 <        rayorigin(&myRay, PRIMARY, NULL, NULL);
111 >        rayorigin(&myRay, PRIMARY|SPECULAR, NULL, NULL);
112          myRay.rno = ndx;
113                                          /* queue ray, check result */
114          process_ray(&myRay, ray_pqueue(&myRay));
# Line 452 | Line 452 | my_face(               /* make an illum face */
452                      raysamp(dim[1], org, dir);
453                  }
454                                  /* add in direct component? */
455 <        if (!directvis && (il->flags & IL_LIGHT || il->sd != NULL)) {
455 >        if (il->flags & IL_LIGHT || il->sd != NULL) {
456                  MAT4    ixfm;
457                  if (il->sd == NULL) {
458                          for (i = 3; i--; ) {
# Line 660 | Line 660 | my_ring(               /* make an illum ring */
660                      raysamp(dim[1], org, dir);
661                  }
662                                  /* add in direct component? */
663 <        if (!directvis && (il->flags & IL_LIGHT || il->sd != NULL)) {
663 >        if (il->flags & IL_LIGHT || il->sd != NULL) {
664                  MAT4    ixfm;
665                  if (il->sd == NULL) {
666                          for (i = 3; i--; ) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines