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

Comparing ray/src/common/testBSDF.c (file contents):
Revision 1.13 by greg, Thu May 10 01:41:33 2018 UTC vs.
Revision 1.14 by greg, Tue Jun 11 14:26:29 2019 UTC

# Line 113 | Line 113 | main(int argc, char *argv[])
113                                                  (unsigned long)strlen(bsdf->mgf));
114                          else
115                                  printf("Has geometry: no\n");
116 <                        continue;
116 >                        break;
117                  case 'C':                       /* report constant values */
118                          if (!bsdf)
119                                  goto noBSDFerr;
# Line 134 | Line 134 | main(int argc, char *argv[])
134                          printXYZ("Diffuse Front Reflectance: ", &bsdf->rLambFront);
135                          printXYZ("Diffuse Back Reflectance: ", &bsdf->rLambBack);
136                          printXYZ("Diffuse Transmittance: ", &bsdf->tLamb);
137 <                        continue;
137 >                        break;
138                  case 'Q':                       /* query BSDF value */
139                          if (!bsdf)
140                                  goto noBSDFerr;
# Line 144 | Line 144 | main(int argc, char *argv[])
144                          vec_from_deg(vout, atof(sskip2(cp,3)), atof(sskip2(cp,4)));
145                          if (!SDreportError(SDevalBSDF(&val, vout, vin, bsdf), stderr))
146                                  printXYZ("", &val);
147 <                        continue;
147 >                        break;
148                  case 'S':                       /* sample BSDF */
149                          if (!bsdf)
150                                  goto noBSDFerr;
# Line 172 | Line 172 | main(int argc, char *argv[])
172                                  printf("%.8f %.8f %.8f ", vout[0], vout[1], vout[2]);
173                                  printXYZ("", &val);
174                          }
175 <                        continue;
175 >                        break;
176                  case 'H':                       /* hemispherical values */
177                  case 'R':
178                  case 'T':
# Line 190 | Line 190 | main(int argc, char *argv[])
190                                  sflags &= ~SDsampSp;
191                          vec_from_deg(vin, atof(sskip2(cp,1)), atof(sskip2(cp,2)));
192                          printf("%.4e\n", SDdirectHemi(vin, sflags, bsdf));
193 <                        continue;
193 >                        break;
194                  case 'A':                       /* resolution in proj. steradians */
195                          if (!bsdf)
196                                  goto noBSDFerr;
# Line 206 | Line 206 | main(int argc, char *argv[])
206                                                  SDqueryMin+SDqueryMax, bsdf), stderr))
207                                          continue;
208                          printf("%.4e %.4e\n", proja[0], proja[1]);
209 <                        continue;
209 >                        break;
210 >                default:
211 >                        Usage(argv[0]);
212 >                        break;
213                  }
214 <                Usage(argv[0]);
214 >                fflush(stdout);                 /* in case we're on remote */
215                  continue;
216   noBSDFerr:
217                  fprintf(stderr, "%s: First, use 'L' command to load BSDF\n", argv[0]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines