| 16 |
|
*/ |
| 17 |
|
|
| 18 |
|
|
| 19 |
+ |
#include "ray.h" |
| 20 |
|
#include "pmapray.h" |
| 21 |
|
#include "pmap.h" |
| 22 |
|
|
| 24 |
|
void ray_init_pmap () |
| 25 |
|
/* Interface to ray_init(); init & load photon maps */ |
| 26 |
|
{ |
| 27 |
+ |
if (NCSAMP > 3 && photonMapping) |
| 28 |
+ |
error(USER, "photon-mapping not currently supported for > 3 spectral samples"); |
| 29 |
+ |
|
| 30 |
|
loadPmaps(photonMaps, pmapParams); |
| 31 |
|
} |
| 32 |
|
|
| 51 |
|
|
| 52 |
|
rp -> pmapParams [t].minGather = pmapParams [t].minGather; |
| 53 |
|
rp -> pmapParams [t].maxGather = pmapParams [t].maxGather; |
| 54 |
+ |
rp -> pmapParams [t].distribTarget = pmapParams [t].distribTarget; |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
|
| 65 |
|
pmapParams [t].fileName = rp -> pmapParams [t].fileName; |
| 66 |
|
pmapParams [t].minGather = rp -> pmapParams [t].minGather; |
| 67 |
|
pmapParams [t].maxGather = rp -> pmapParams [t].maxGather; |
| 68 |
+ |
pmapParams [t].distribTarget = rp -> pmapParams [t].distribTarget; |
| 69 |
+ |
} |
| 70 |
+ |
} |
| 71 |
+ |
|
| 72 |
+ |
void ray_defaults_pmap (RAYPARAMS *rp) |
| 73 |
+ |
/* Interface to ray_defaults(); set photon mapping defaults */ |
| 74 |
+ |
{ |
| 75 |
+ |
unsigned t; |
| 76 |
+ |
|
| 77 |
+ |
for (t = 0; t < NUM_PMAP_TYPES; t++) { |
| 78 |
+ |
rp -> pmapParams [t].fileName = NULL; |
| 79 |
+ |
rp -> pmapParams [t].minGather = 0; |
| 80 |
+ |
rp -> pmapParams [t].maxGather = 0; |
| 81 |
+ |
rp -> pmapParams [t].distribTarget = 0; |
| 82 |
|
} |
| 83 |
|
} |