commit c2ab9ef13240c53f7a15f0f009b004770a026a4b
parent 4fdd40178f5d747c20e78227d856299550a19873
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Mon, 10 Oct 2016 10:30:09 +0200
Output on receivers: weight is now in double
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/ssol.h b/src/ssol.h
@@ -206,7 +206,7 @@ struct receiver_data {
float pos[3];
float in_dir[3];
float normal[3];
- float weight;
+ double weight;
float uv[2];
};
diff --git a/src/ssol_solver.c b/src/ssol_solver.c
@@ -690,7 +690,7 @@ filter_receiver_hit_candidates(struct realisation* rs)
candidates++)
{
struct receiver_data out;
- float weight;
+ double weight;
if (candidates->hit_distance == prev_distance) {
size_t i = 0, is_duplicate = 0;
struct ssol_instance** ptr = darray_instances_ptr_data_get(inst_array);
@@ -712,8 +712,8 @@ filter_receiver_hit_candidates(struct realisation* rs)
}
/* take amosphere into account with distance to receiver */
- weight = (float) (seg->weight * compute_atmosphere_attenuation(
- rs->data.scene->atmosphere, candidates->hit_distance, rs->wavelength));
+ weight = seg->weight * compute_atmosphere_attenuation(
+ rs->data.scene->atmosphere, candidates->hit_distance, rs->wavelength);
out.realization_id = rs->rs_id;
out.date = 0; /* TODO */
out.segment_id = rs->s_idx;