commit bfa7a46b07f9d0e95891c16da739a08a0d9f4064
parent 3a2215aed9dc597a8074342dfb6196b22f5e6281
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 7 Jul 2021 16:48:33 +0200
Merge branch 'release_0.7'
Diffstat:
8 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/cmake/atmosphere/CMakeLists.txt b/cmake/atmosphere/CMakeLists.txt
@@ -24,7 +24,7 @@ project(htrdr-atmosphere)
find_package(HTSky 0.2 REQUIRED)
find_package(RCMake 0.3 REQUIRED)
find_package(RSys 0.11 REQUIRED)
-find_package(Star3D 0.7.1 REQUIRED)
+find_package(Star3D 0.8 REQUIRED)
find_package(StarSF 0.6 REQUIRED)
find_package(StarSP 0.9 REQUIRED)
find_package(StarVX 0.1 REQUIRED)
diff --git a/cmake/combustion/CMakeLists.txt b/cmake/combustion/CMakeLists.txt
@@ -24,7 +24,7 @@ project(htrdr-combustion)
find_package(AtrSTM REQUIRED)
find_package(RCMake 0.3 REQUIRED)
find_package(RSys 0.11 REQUIRED)
-find_package(Star3D 0.7.1 REQUIRED)
+find_package(Star3D 0.8 REQUIRED)
find_package(StarSF 0.6 REQUIRED)
find_package(StarSP 0.10 REQUIRED)
find_package(StarVX 0.1 REQUIRED)
diff --git a/cmake/core/CMakeLists.txt b/cmake/core/CMakeLists.txt
@@ -25,7 +25,7 @@ find_package(AW 2.0 REQUIRED)
find_package(MruMtl 0.0 REQUIRED)
find_package(RCMake 0.3 REQUIRED)
find_package(RSys 0.11 REQUIRED)
-find_package(Star3D 0.7.1 REQUIRED)
+find_package(Star3D 0.8 REQUIRED)
find_package(StarSF 0.6 REQUIRED)
find_package(StarSP 0.9 REQUIRED)
find_package(OpenMP 1.2 REQUIRED)
diff --git a/doc/htrdr-combustion.1.txt.in b/doc/htrdr-combustion.1.txt.in
@@ -286,12 +286,11 @@ depending on the type of calculation performed by *htrdr-combustion*.
Shortwave monochromatic image
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-For a monochromatic image rendering, the first and second pixel components are
-not used. The expected value and the standard deviation of the pixel radiance
-(in W/sr/m^2) are saved on the third and fourth components. The fifth and
-sixth components of the pixel are also not used while the last 2 components of
-the pixel (the seventh and the eighth) record the estimate in microseconds of
-the computation time per radiative path and its standard error.
+For a monochromatic image rendering, the expected value and the standard
+deviation of the pixel radiance (in W/sr/m^2) are saved on the first and the
+second components. All other components are unused excepted the seventh and
+eighth components that store the estimate of the radiative path computation
+time in microseconds and its standard error.
Shortwave flux density map
~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/src/atmosphere/htrdr_atmosphere_args.c b/src/atmosphere/htrdr_atmosphere_args.c
@@ -65,7 +65,7 @@ print_help(const char* cmd)
printf(
" -m MIE filename of the Mie's data.\n");
printf(
-" -n SKY-NAME name used to identify the sky in the MATERIALS file.\n"
+" -n SKY-NAME name used to identify the sky in the MATERIALS file.\n"
" Its default value is `%s'.\n",
HTRDR_ATMOSPHERE_ARGS_DEFAULT.sky_mtl_name);
printf(
diff --git a/src/combustion/htrdr_combustion_geometry_ray_filter.c b/src/combustion/htrdr_combustion_geometry_ray_filter.c
@@ -32,6 +32,7 @@ geometry_ray_filter_discard_medium_interface
(const struct s3d_hit* hit,
const float ray_org[3],
const float ray_dir[3],
+ const float ray_range[2],
void* ray_data,
void* filter_data)
{
@@ -41,8 +42,8 @@ geometry_ray_filter_discard_medium_interface
float N[3];
int hit_front;
int discard = 0;
- ASSERT(hit && ray_org && ray_dir && ray_data && !S3D_HIT_NONE(hit));
- (void)ray_org, (void)ray_dir, (void)filter_data;
+ ASSERT(hit && ray_org && ray_dir && ray_range && ray_data && !S3D_HIT_NONE(hit));
+ (void)ray_org, (void)ray_dir, (void)ray_range, (void)filter_data;
/* Recover the interface of the intersected surface */
htrdr_geometry_get_interface(ctx->geom, hit, &interf);
diff --git a/src/combustion/htrdr_combustion_geometry_ray_filter.h b/src/combustion/htrdr_combustion_geometry_ray_filter.h
@@ -41,6 +41,7 @@ geometry_ray_filter_discard_medium_interface
(const struct s3d_hit* hit,
const float ray_org[3],
const float ray_dir[3],
+ const float ray_range[2],
void* ray_data, /* Must point to a struct geometry_ray_filter_context */
void* filter_data);
diff --git a/src/core/htrdr_geometry.c b/src/core/htrdr_geometry.c
@@ -60,13 +60,12 @@ struct mesh {
static const struct mesh MESH_NULL;
struct ray_context {
- float range[2];
struct s3d_hit hit_from;
s3d_hit_filter_function_T user_filter; /* May be NULL */
void* user_filter_data; /* May be NULL */
};
-#define RAY_CONTEXT_NULL__ {{0,INF}, S3D_HIT_NULL__, NULL, NULL}
+#define RAY_CONTEXT_NULL__ {S3D_HIT_NULL__, NULL, NULL}
static const struct ray_context RAY_CONTEXT_NULL = RAY_CONTEXT_NULL__;
struct htrdr_geometry {
@@ -149,6 +148,7 @@ geometry_filter
(const struct s3d_hit* hit,
const float ray_org[3],
const float ray_dir[3],
+ const float ray_range[2],
void* ray_data,
void* filter_data)
{
@@ -158,14 +158,14 @@ geometry_filter
if(!ray_ctx) /* Nothing to do */
return 0;
- if(self_hit(hit, ray_org, ray_dir, ray_ctx->range, &ray_ctx->hit_from))
+ if(self_hit(hit, ray_org, ray_dir, ray_range, &ray_ctx->hit_from))
return 1; /* Discard this hit */
if(!ray_ctx->user_filter) /* That's all */
return 0;
return ray_ctx->user_filter /* Invoke user filtering */
- (hit, ray_org, ray_dir, ray_ctx->user_filter_data, filter_data);
+ (hit, ray_org, ray_dir, ray_range, ray_ctx->user_filter_data, filter_data);
}
static res_T
@@ -685,18 +685,19 @@ htrdr_geometry_trace_ray
struct ray_context ray_ctx = RAY_CONTEXT_NULL;
float ray_org[3];
float ray_dir[3];
+ float ray_range[2];
res_T res = RES_OK;
ASSERT(geom && args && hit);
f3_set_d3(ray_org, args->ray_org);
f3_set_d3(ray_dir, args->ray_dir);
- f2_set_d2(ray_ctx.range, args->ray_range);
+ f2_set_d2(ray_range, args->ray_range);
ray_ctx.hit_from = args->hit_from;
ray_ctx.user_filter = args->filter;
ray_ctx.user_filter_data = args->filter_context;
res = s3d_scene_view_trace_ray
- (geom->view, ray_org, ray_dir, ray_ctx.range, &ray_ctx, hit);
+ (geom->view, ray_org, ray_dir, ray_range, &ray_ctx, hit);
if(res != RES_OK) {
htrdr_log_err(geom->htrdr,
"%s: could not trace the ray against the geometry -- %s.\n",