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

Comparing ray/src/util/rfluxmtx.c (file contents):
Revision 2.18 by greg, Tue Aug 26 19:10:10 2014 UTC vs.
Revision 2.19 by greg, Thu Dec 4 05:26:28 2014 UTC

# Line 516 | Line 516 | make_axes(FVECT uva[2], const FVECT nrm)
516   {
517          int     i;
518  
519 <        uva[1][0] = 0.5 - frandom();
520 <        uva[1][1] = 0.5 - frandom();
521 <        uva[1][2] = 0.5 - frandom();
522 <        for (i = 3; i--; )
523 <                if ((-0.6 < nrm[i]) & (nrm[i] < 0.6))
524 <                        break;
525 <        if (i < 0) {
519 >        if (!getperpendicular(uva[0], nrm)) {
520                  fputs(progname, stderr);
521                  fputs(": bad surface normal in make_axes!\n", stderr);
522                  exit(1);
523          }
524 <        uva[1][i] = 1.0;
531 <        VCROSS(uva[0], uva[1], nrm);
532 <        normalize(uva[0]);
533 <        VCROSS(uva[1], nrm, uva[0]);
524 >        fcross(uva[1], nrm, uva[0]);
525   }
526  
527   /* Illegal sender surfaces end up here */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines