commit aab2291c78a4261bfd9f43cf9dda5d8f282f2bb1
parent 40c436547e33a0f9b9dcf742d180aba67aee8da3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 22 Jun 2021 17:13:16 +0200
Update Star-2D to 0.5 and Star-3D to 0.8
Fix API break on filter function introduced by these new versions.
Diffstat:
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -26,8 +26,8 @@ option(NO_TEST "Disable the test" OFF)
find_package(RCMake 0.2.3 REQUIRED)
find_package(RSys 0.6 REQUIRED)
find_package(StarSP 0.7 REQUIRED)
-find_package(Star3D 0.5 REQUIRED)
-find_package(Star2D 0.1 REQUIRED)
+find_package(Star3D 0.8 REQUIRED)
+find_package(Star2D 0.5 REQUIRED)
find_package(OpenMP 1.2 REQUIRED)
include_directories(
diff --git a/src/sgf_scene.c b/src/sgf_scene.c
@@ -28,11 +28,12 @@ hit_filter_s3d
(const struct s3d_hit* hit,
const float org[3],
const float dir[3],
+ const float range[2],
void* ray_data,
void* filter_data)
{
struct s3d_primitive* prim_from = ray_data;
- (void)org, (void)dir, (void)filter_data;
+ (void)org, (void)dir, (void)range, (void)filter_data;
if(!ray_data) return 0;
/* Discard primitive from which the ray starts from */
@@ -47,11 +48,12 @@ hit_filter_s2d
(const struct s2d_hit* hit,
const float org[3],
const float dir[3],
+ const float range[2],
void* ray_data,
void* filter_data)
{
struct s2d_primitive* prim_from = ray_data;
- (void)org, (void)dir, (void)filter_data;
+ (void)org, (void)dir, (void)range, (void)filter_data;
if(!ray_data) return 0;
/* Discard primitive from which the ray starts from */
diff --git a/src/test_sgf_cube.c b/src/test_sgf_cube.c
@@ -139,7 +139,7 @@ check_bottom_top_medium_gf
/* Check the Gebhart factor between the bottom plane and the medium */
E = (status[2].E + status[3].E)/2;
SE = (status[2].SE + status[3].SE)/2;
- CHK(eq_eps(E, gf_bottom_medium, SE) == 1);
+ CHK(eq_eps(E, gf_bottom_medium, SE*3) == 1);
CHK(sgf_scene_end_integration(scn) == RES_OK);
}