69 |
|
} |
70 |
|
sprintf(buf, "view type (%c): ", ourview.type); |
71 |
|
(*dev->comout)(buf); |
72 |
< |
(*dev->comin)(buf); |
72 |
> |
(*dev->comin)(buf, NULL); |
73 |
|
if (buf[0] == CTRL(C)) return; |
74 |
|
if (buf[0] && buf[0] != ourview.type) { |
75 |
|
nv.type = buf[0]; |
79 |
|
sprintf(buf, "view point (%.6g %.6g %.6g): ", |
80 |
|
ourview.vp[0], ourview.vp[1], ourview.vp[2]); |
81 |
|
(*dev->comout)(buf); |
82 |
< |
(*dev->comin)(buf); |
82 |
> |
(*dev->comin)(buf, NULL); |
83 |
|
if (buf[0] == CTRL(C)) return; |
84 |
|
if (sscanf(buf, "%lf %lf %lf", &nv.vp[0], &nv.vp[1], &nv.vp[2]) == 3) |
85 |
|
change++; |
88 |
|
sprintf(buf, "view direction (%.6g %.6g %.6g): ", |
89 |
|
ourview.vdir[0], ourview.vdir[1], ourview.vdir[2]); |
90 |
|
(*dev->comout)(buf); |
91 |
< |
(*dev->comin)(buf); |
91 |
> |
(*dev->comin)(buf, NULL); |
92 |
|
if (buf[0] == CTRL(C)) return; |
93 |
|
if (sscanf(buf,"%lf %lf %lf",&nv.vdir[0],&nv.vdir[1],&nv.vdir[2]) == 3) |
94 |
|
change++; |
97 |
|
sprintf(buf, "view up (%.6g %.6g %.6g): ", |
98 |
|
ourview.vup[0], ourview.vup[1], ourview.vup[2]); |
99 |
|
(*dev->comout)(buf); |
100 |
< |
(*dev->comin)(buf); |
100 |
> |
(*dev->comin)(buf, NULL); |
101 |
|
if (buf[0] == CTRL(C)) return; |
102 |
|
if (sscanf(buf,"%lf %lf %lf",&nv.vup[0],&nv.vup[1],&nv.vup[2]) == 3) |
103 |
|
change++; |
106 |
|
sprintf(buf, "view horiz and vert size (%.6g %.6g): ", |
107 |
|
ourview.horiz, ourview.vert); |
108 |
|
(*dev->comout)(buf); |
109 |
< |
(*dev->comin)(buf); |
109 |
> |
(*dev->comin)(buf, NULL); |
110 |
|
if (buf[0] == CTRL(C)) return; |
111 |
|
if (sscanf(buf, "%lf %lf", &nv.horiz, &nv.vert) == 2) |
112 |
|
change++; |
116 |
|
sprintf(buf, "view shift and lift (%.6g %.6g): ", |
117 |
|
ourview.hoff, ourview.voff); |
118 |
|
(*dev->comout)(buf); |
119 |
< |
(*dev->comin)(buf); |
119 |
> |
(*dev->comin)(buf, NULL); |
120 |
|
if (buf[0] == CTRL(C)) return; |
121 |
|
if (sscanf(buf, "%lf %lf", &nv.hoff, &nv.voff) == 2) |
122 |
|
change++; |
282 |
|
if (*cp == '\0') { /* interactive */ |
283 |
|
sprintf(buf, "exposure (%lf): ", exposure); |
284 |
|
(*dev->comout)(buf); |
285 |
< |
(*dev->comin)(buf); |
285 |
> |
(*dev->comin)(buf, NULL); |
286 |
|
for (cp = buf; isspace(*cp); cp++) |
287 |
|
; |
288 |
|
if (*cp == '\0') |
335 |
|
|
336 |
|
if (s[0] == '\0') { |
337 |
|
(*dev->comout)("aa ab ad ar as av dc dj dt lr lw sp st: "); |
338 |
< |
(*dev->comin)(buf); |
338 |
> |
(*dev->comin)(buf, NULL); |
339 |
|
s = buf; |
340 |
|
} |
341 |
|
switch (s[0]) { |
346 |
|
sprintf(buf, "limit weight (%.6g): ", |
347 |
|
minweight); |
348 |
|
(*dev->comout)(buf); |
349 |
< |
(*dev->comin)(buf); |
349 |
> |
(*dev->comin)(buf, NULL); |
350 |
|
if (sscanf(buf, "%lf", &d0) != 1) |
351 |
|
break; |
352 |
|
} |
357 |
|
sprintf(buf, "limit reflection (%d): ", |
358 |
|
maxdepth); |
359 |
|
(*dev->comout)(buf); |
360 |
< |
(*dev->comin)(buf); |
360 |
> |
(*dev->comin)(buf, NULL); |
361 |
|
if (sscanf(buf, "%d", &i0) != 1) |
362 |
|
break; |
363 |
|
} |
374 |
|
sprintf(buf, "direct jitter (%.6g): ", |
375 |
|
dstrsrc); |
376 |
|
(*dev->comout)(buf); |
377 |
< |
(*dev->comin)(buf); |
377 |
> |
(*dev->comin)(buf, NULL); |
378 |
|
if (sscanf(buf, "%lf", &d0) != 1) |
379 |
|
break; |
380 |
|
} |
385 |
|
sprintf(buf, "direct certainty (%.6g): ", |
386 |
|
shadcert); |
387 |
|
(*dev->comout)(buf); |
388 |
< |
(*dev->comin)(buf); |
388 |
> |
(*dev->comin)(buf, NULL); |
389 |
|
if (sscanf(buf, "%lf", &d0) != 1) |
390 |
|
break; |
391 |
|
} |
396 |
|
sprintf(buf, "direct threshold (%.6g): ", |
397 |
|
shadthresh); |
398 |
|
(*dev->comout)(buf); |
399 |
< |
(*dev->comin)(buf); |
399 |
> |
(*dev->comin)(buf, NULL); |
400 |
|
if (sscanf(buf, "%lf", &d0) != 1) |
401 |
|
break; |
402 |
|
} |
416 |
|
colval(ambval,GRN), |
417 |
|
colval(ambval,BLU)); |
418 |
|
(*dev->comout)(buf); |
419 |
< |
(*dev->comin)(buf); |
419 |
> |
(*dev->comin)(buf, NULL); |
420 |
|
if (sscanf(buf, "%lf %lf %lf", |
421 |
|
&d0, &d1, &d2) != 3) |
422 |
|
break; |
428 |
|
sprintf(buf, "ambient accuracy (%.6g): ", |
429 |
|
ambacc); |
430 |
|
(*dev->comout)(buf); |
431 |
< |
(*dev->comin)(buf); |
431 |
> |
(*dev->comin)(buf, NULL); |
432 |
|
if (sscanf(buf, "%lf", &d0) != 1) |
433 |
|
break; |
434 |
|
} |
439 |
|
sprintf(buf, "ambient divisions (%d): ", |
440 |
|
ambdiv); |
441 |
|
(*dev->comout)(buf); |
442 |
< |
(*dev->comin)(buf); |
442 |
> |
(*dev->comin)(buf, NULL); |
443 |
|
if (sscanf(buf, "%d", &i0) != 1) |
444 |
|
break; |
445 |
|
} |
450 |
|
sprintf(buf, "ambient super-samples (%d): ", |
451 |
|
ambssamp); |
452 |
|
(*dev->comout)(buf); |
453 |
< |
(*dev->comin)(buf); |
453 |
> |
(*dev->comin)(buf, NULL); |
454 |
|
if (sscanf(buf, "%d", &i0) != 1) |
455 |
|
break; |
456 |
|
} |
461 |
|
sprintf(buf, "ambient bounces (%d): ", |
462 |
|
ambounce); |
463 |
|
(*dev->comout)(buf); |
464 |
< |
(*dev->comin)(buf); |
464 |
> |
(*dev->comin)(buf, NULL); |
465 |
|
if (sscanf(buf, "%d", &i0) != 1) |
466 |
|
break; |
467 |
|
} |
472 |
|
sprintf(buf, "ambient resolution (%d): ", |
473 |
|
ambres); |
474 |
|
(*dev->comout)(buf); |
475 |
< |
(*dev->comin)(buf); |
475 |
> |
(*dev->comin)(buf, NULL); |
476 |
|
if (sscanf(buf, "%d", &i0) != 1) |
477 |
|
break; |
478 |
|
} |
489 |
|
if (sscanf(s+2, "%d", &i0) != 1) { |
490 |
|
sprintf(buf, "sample pixel (%d): ", psample); |
491 |
|
(*dev->comout)(buf); |
492 |
< |
(*dev->comin)(buf); |
492 |
> |
(*dev->comin)(buf, NULL); |
493 |
|
if (sscanf(buf, "%d", &i0) != 1) |
494 |
|
break; |
495 |
|
} |
501 |
|
sprintf(buf, "sample threshold (%.6g): ", |
502 |
|
maxdiff); |
503 |
|
(*dev->comout)(buf); |
504 |
< |
(*dev->comin)(buf); |
504 |
> |
(*dev->comin)(buf, NULL); |
505 |
|
if (sscanf(buf, "%lf", &d0) != 1) |
506 |
|
break; |
507 |
|
} |
560 |
|
ofun[thisray.ro->otype].funame, |
561 |
|
thisray.ro->oname); |
562 |
|
(*dev->comout)(buf); |
563 |
< |
(*dev->comin)(buf); |
563 |
> |
(*dev->comin)(buf, NULL); |
564 |
|
if (thisray.rot >= FHUGE) |
565 |
|
(*dev->comout)("at infinity"); |
566 |
|
else { |
568 |
|
thisray.rop[1], thisray.rop[2]); |
569 |
|
(*dev->comout)(buf); |
570 |
|
} |
571 |
< |
(*dev->comin)(buf); |
571 |
> |
(*dev->comin)(buf, NULL); |
572 |
|
sprintf(buf, "with value (%.6g %.6g %.6g)", |
573 |
|
colval(thisray.rcol,RED), |
574 |
|
colval(thisray.rcol,GRN), |
575 |
|
colval(thisray.rcol,BLU)); |
576 |
|
(*dev->comout)(buf); |
577 |
|
} |
578 |
< |
(*dev->comin)(buf); |
578 |
> |
(*dev->comin)(buf, NULL); |
579 |
|
} |
580 |
|
|
581 |
|
|