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

Comparing ray/src/cv/bsdf2ttree.c (file contents):
Revision 2.28 by greg, Mon Mar 24 03:50:28 2014 UTC vs.
Revision 2.30 by greg, Tue May 5 22:16:49 2015 UTC

# Line 41 | Line 41 | static int             do_prog = 79;
41   static void
42   prog_show(double frac)
43   {
44 <        char    pbar[256];
45 <        int     nchars;
44 >        static unsigned call_cnt = 0;
45 >        static char     lastc[] = "-\\|/";
46 >        char            pbar[256];
47 >        int             nchars;
48  
49 <        if (do_prog <= 0) return;
49 >        if (do_prog <= 1) return;
50          if (do_prog > sizeof(pbar)-2)
51                  do_prog = sizeof(pbar)-2;
52          if (frac < 0) frac = 0;
53 <        else if (frac > 1) frac = 1;
54 <        nchars = do_prog*frac + .5;
53 >        else if (frac >= 1) frac = .9999;
54 >        nchars = do_prog*frac;
55          pbar[0] = '\r';
56          memset(pbar+1, '*', nchars);
57 <        memset(pbar+1+nchars, '-', do_prog-nchars);
57 >        pbar[nchars+1] = lastc[call_cnt++ & 3];
58 >        memset(pbar+2+nchars, '-', do_prog-nchars-1);
59          pbar[do_prog+1] = '\0';
60          fputs(pbar, stderr);
61   }
# Line 199 | Line 202 | eval_isotropic(char *funame)
202                          iovec[5] = output_orient *
203                                  sqrt(1. - iovec[3]*iovec[3] - iovec[4]*iovec[4]);
204                          if (funame == NULL)
205 <                            bsdf = eval_rbfrep(rbf, iovec+3) *
203 <                                                output_orient/iovec[5];
205 >                            bsdf = eval_rbfrep(rbf, iovec+3);
206                          else {
207                              if (assignD) {
208                                  varset("Dx", '=', -iovec[3]);
# Line 313 | Line 315 | eval_anisotropic(char *funame)
315                          iovec[5] = output_orient *
316                                  sqrt(1. - iovec[3]*iovec[3] - iovec[4]*iovec[4]);
317                          if (funame == NULL)
318 <                            bsdf = eval_rbfrep(rbf, iovec+3) *
317 <                                                output_orient/iovec[5];
318 >                            bsdf = eval_rbfrep(rbf, iovec+3);
319                          else {
320                              if (assignD) {
321                                  varset("Dx", '=', -iovec[3]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines