33 |
|
|
34 |
|
int unbuffered = 0; |
35 |
|
|
36 |
+ |
int repeatcnt = 1; |
37 |
+ |
|
38 |
|
char *progname; |
39 |
|
|
40 |
|
|
46 |
|
{ |
47 |
|
char *err; |
48 |
|
int rval, getdim = 0; |
49 |
< |
register int i; |
49 |
> |
int i; |
50 |
|
|
51 |
|
progname = argv[0]; |
52 |
|
if (argc < 2) |
105 |
|
exit(1); |
106 |
|
} |
107 |
|
break; |
108 |
+ |
case 'c': /* repeat count */ |
109 |
+ |
repeatcnt = atoi(argv[++i]); |
110 |
+ |
break; |
111 |
|
case 'p': /* pixel aspect or jitter */ |
112 |
|
if (argv[i][2] == 'a') |
113 |
|
pa = atof(argv[++i]); |
161 |
|
exit(0); |
162 |
|
userr: |
163 |
|
fprintf(stderr, |
164 |
< |
"Usage: %s [ -i -u -f{a|f|d} | -d ] { view opts .. | picture [zbuf] }\n", |
164 |
> |
"Usage: %s [ -i -u -f{a|f|d} -c rept | -d ] { view opts .. | picture [zbuf] }\n", |
165 |
|
progname); |
166 |
|
exit(1); |
167 |
|
} |
190 |
|
RREAL loc[2]; |
191 |
|
int pp[2]; |
192 |
|
double d; |
193 |
< |
register int i; |
193 |
> |
int i; |
194 |
|
|
195 |
|
while (fscanf(fp, "%lf %lf", &px, &py) == 2) { |
196 |
|
px += .5; py += .5; |
239 |
|
float *zbuf = NULL; |
240 |
|
int sc; |
241 |
|
double d; |
242 |
< |
register int si, i; |
242 |
> |
int si, i, c; |
243 |
|
|
244 |
|
if (zfd >= 0) { |
245 |
|
zbuf = (float *)malloc(scanlen(&rs)*sizeof(float)); |
258 |
|
} |
259 |
|
} |
260 |
|
for (si = 0; si < scanlen(&rs); si++) { |
261 |
+ |
for (c = repeatcnt; c-- > 0; ) { |
262 |
|
pix2loc(loc, &rs, si, sc); |
263 |
|
jitterloc(loc); |
264 |
|
d = viewray(rorg, rdir, &vw, loc[0], loc[1]); |
274 |
|
rdir[0] *= d; rdir[1] *= d; rdir[2] *= d; |
275 |
|
} |
276 |
|
(*putr)(rorg, rdir); |
277 |
+ |
} |
278 |
|
} |
279 |
|
} |
280 |
|
if (zfd >= 0) |