commit cb2666aef7a8041674d5424d6fd088795a725d64
parent 9ccba0ca6e9ad28a2fec5b8dc4a1a5c3132cf5da
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 20 Mar 2017 11:29:17 +0100
Handle the dump radiative paths options
Adjust the length of the infinite path segments wrt the -p arguments
Diffstat:
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/solstice.c b/src/solstice.c
@@ -604,6 +604,10 @@ solstice_init
solstice->dump_split_mode = args->dump_split_mode;
solstice->dump_paths = args->dump_paths;
+ solstice->path_tracker = SSOL_PATH_TRACKER_DEFAULT;
+ solstice->path_tracker.infinite_ray_length = args->infinite_ray_length;
+ solstice->path_tracker.sun_ray_length = args->sun_ray_length;
+
if(args->rendering) {
res = setup_camera(solstice, args);
if(res != RES_OK) goto error;
diff --git a/src/solstice.h b/src/solstice.h
@@ -94,6 +94,9 @@ struct solstice {
enum solstice_args_dump_format dump_format;
enum solstice_args_dump_split_mode dump_split_mode;
+ /* Dump radiative paths mode */
+ struct ssol_path_tracker path_tracker;
+
struct darray_double sun_dirs; /* List of double3 */
struct darray_double sun_angles;
diff --git a/src/solstice_solve.c b/src/solstice_solve.c
@@ -379,7 +379,7 @@ solstice_solve(struct solstice* solstice)
}
res = ssol_solve(solstice->scene, rng, solstice->nexperiments,
- solstice->dump_paths ? &SSOL_PATH_TRACKER_DEFAULT : NULL, bin_stream,
+ solstice->dump_paths ? &solstice->path_tracker : NULL, bin_stream,
&estimator);
if(res != RES_OK) {
fprintf(stderr, "Error in integrating the solar flux.\n");