| 1495 |
|
const char * err = setview(&ourview); |
| 1496 |
|
if (err != NULL) |
| 1497 |
|
error(USER, err); |
| 1498 |
+ |
if (myRCmanager.HasFlag(RTimmIrrad)) |
| 1499 |
+ |
error(USER, "-I+ not allowed in view generation mode"); |
| 1500 |
|
normaspect(viewaspect(&ourview), &pixaspect, |
| 1501 |
|
&myRCmanager.xres, &myRCmanager.yres); |
| 1502 |
|
if ((myRCmanager.xres <= 0) | (myRCmanager.yres <= 0)) |
| 1511 |
|
myRCmanager.accum = 1; |
| 1512 |
|
} else { // else surface sampling |
| 1513 |
|
if (do_irrad | myRCmanager.HasFlag(RTimmIrrad)) |
| 1514 |
< |
error(USER, "-i, -I not allowed in surface-sampling mode"); |
| 1514 |
> |
error(USER, "-i+, -I+ not allowed in surface-sampling mode"); |
| 1515 |
|
myRCmanager.SetFlag(RTlimDist, false); |
| 1516 |
|
if (load_scene(sendfn, add_send_object) < 0) |
| 1517 |
|
quit(1); |
| 1614 |
|
myRCmanager.SetThreadCount(nproc); |
| 1615 |
|
} |
| 1616 |
|
if (gotView) { // picture generation mode? |
| 1617 |
+ |
i = myRCmanager.GetRowCount(); |
| 1618 |
|
if (verby) { |
| 1619 |
|
sprintf(errmsg, "%s %d %dx%d pictures\n", |
| 1620 |
< |
myRCmanager.GetRowCount() ? "completing" : "computing", |
| 1620 |
> |
i ? "completing" : "computing", |
| 1621 |
|
nout, myRCmanager.xres, myRCmanager.yres); |
| 1622 |
|
if (myRCmanager.accum > 1) |
| 1623 |
|
sprintf(errmsg+strlen(errmsg)-1, " with %d samples/pixel\n", |
| 1624 |
|
myRCmanager.accum); |
| 1625 |
|
eputs(errmsg); |
| 1626 |
|
} |
| 1627 |
< |
i = myRCmanager.GetRowCount()/myRCmanager.xres; |
| 1627 |
> |
i /= myRCmanager.xres; |
| 1628 |
|
int xstart = myRCmanager.GetRowCount() - i*myRCmanager.xres; |
| 1629 |
|
i = myRCmanager.yres - i; |
| 1630 |
|
while (i--) // compute pixel rows from yres down |
| 1631 |
< |
for (int x = xstart, xstart = 0; x < myRCmanager.xres; x++) { |
| 1631 |
> |
for (int x = xstart; x < myRCmanager.xres; xstart = 0, x++) { |
| 1632 |
|
report_progress(); |
| 1633 |
|
if (!viewRayBundle(rayarr, x, i)) |
| 1634 |
|
quit(1); |