| 13 |
|
#include "random.h" |
| 14 |
|
#include "source.h" |
| 15 |
|
#include "ambient.h" |
| 16 |
+ |
#include "pmapray.h" |
| 17 |
+ |
#include "pmapcontrib.h" |
| 18 |
|
|
| 19 |
|
int gargc; /* global argc */ |
| 20 |
|
char **gargv; /* global argv */ |
| 273 |
|
break; |
| 274 |
|
case 'p': /* parameter setting(s) */ |
| 275 |
|
check(2,"s"); |
| 276 |
< |
prms = argv[++i]; |
| 276 |
> |
set_eparams(prms = argv[++i]); |
| 277 |
|
break; |
| 278 |
|
case 'b': /* bin expression/count */ |
| 279 |
|
if (argv[i][2] == 'n') { |
| 342 |
|
readoct(octname, ~(IO_FILES|IO_INFO), &thescene, NULL); |
| 343 |
|
nsceneobjs = nobjects; |
| 344 |
|
|
| 345 |
+ |
/* PMAP: set up & load photon maps */ |
| 346 |
+ |
ray_init_pmap(); |
| 347 |
+ |
|
| 348 |
|
marksources(); /* find and mark sources */ |
| 349 |
+ |
|
| 350 |
+ |
/* PMAP: init photon map for light source contributions */ |
| 351 |
+ |
initPmapContrib(&modconttab, nmods); |
| 352 |
|
|
| 353 |
|
setambient(); /* initialize ambient calculation */ |
| 354 |
< |
|
| 354 |
> |
|
| 355 |
|
rcontrib(); /* trace ray contributions (loop) */ |
| 356 |
|
|
| 357 |
|
ambsync(); /* flush ambient file */ |
| 358 |
|
|
| 359 |
+ |
/* PMAP: free photon maps */ |
| 360 |
+ |
ray_done_pmap(); |
| 361 |
+ |
|
| 362 |
|
quit(0); /* exit clean */ |
| 363 |
|
|
| 364 |
|
badopt: |