commit 48478c2109d6564a7c9ce3cce0d666f9eec15b32
parent 5820b52dbcf7167ee1dffcd41bb0600f28b094ba
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 28 Apr 2023 11:36:33 +0200
Merge branch 'release_0.6'
Diffstat:
32 files changed, 58 insertions(+), 44 deletions(-)
diff --git a/README.md b/README.md
@@ -97,6 +97,10 @@ with `<STAR2D_INSTALL_DIR>` the install directory of Star-2D and
## Release notes
+### Version 0.6
+
+- Upgrading the ray-tracing backend from Embree3 to Embree4
+
### Version 0.5.1
- Corrects an invalid memory read.
@@ -157,8 +161,8 @@ argument. For closest point queries, this range is from 0 to query radius.
## License
-Copyright (C) 2016-2021 |Meso|Star> (<contact@meso-star.com>). Star-2D is free
-software released under the CeCILL v2.1 license. You are welcome to
+Copyright (C) 2016-2021, 2023 |Méso|Star> (<contact@meso-star.com>). Star-2D is
+free software released under the CeCILL v2.1 license. You are welcome to
redistribute it under certain conditions; refer to the COPYING files for
details.
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+# Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
#
# This software is governed by the CeCILL license under French law and
# abiding by the rules of distribution of free software. You can use,
@@ -36,7 +36,7 @@ option(NO_TEST "Disable the test" OFF)
################################################################################
# Check dependencies
################################################################################
-find_package(Embree 3.6 REQUIRED)
+find_package(Embree 4 REQUIRED)
find_package(RCMake 0.2.2 REQUIRED)
find_package(RSys 0.6 REQUIRED)
@@ -56,8 +56,8 @@ endif()
# Configure and define targets
################################################################################
set(VERSION_MAJOR 0)
-set(VERSION_MINOR 5)
-set(VERSION_PATCH 1)
+set(VERSION_MINOR 6)
+set(VERSION_PATCH 0)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
set(S2D_FILES_SRC
diff --git a/src/s2d.h b/src/s2d.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_backend.h b/src/s2d_backend.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is a computer program whose purpose is to describe a
* virtual 3D environment that can be ray-traced and sampled both robustly
@@ -36,15 +36,22 @@
#include <rsys/rsys.h> /* COMPILER_CL */
#ifdef COMPILER_CL
-/* Structure was padded due to alignment specifier */
-#pragma warning(push)
-#pragma warning(disable: 4324)
+ /* Structure was padded due to alignment specifier */
+ #pragma warning(push)
+ #pragma warning(disable: 4324)
+#elif defined COMPILER_GCC
+ /* Disable the "ISO C restricts enumerator values to range of 'int'" compiler
+ * warning in rtcore_common.h, line 293 (RTC_FEATURE_FLAG_ALL = 0xffffffff) */
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wpedantic"
#endif
-#include <embree3/rtcore.h>
+#include <embree4/rtcore.h>
#ifdef COMPILER_CL
-#pragma warning(pop)
+ #pragma warning(pop)
+#elif defined COMPILER_GCC
+ #pragma GCC diagnostic pop
#endif
#endif /* S2D_BACKEND_H */
diff --git a/src/s2d_buffer.h b/src/s2d_buffer.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_c.h b/src/s2d_c.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_device.c b/src/s2d_device.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_device_c.h b/src/s2d_device_c.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_geometry.c b/src/s2d_geometry.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_geometry.h b/src/s2d_geometry.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_line_segments.c b/src/s2d_line_segments.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_line_segments.h b/src/s2d_line_segments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_primitive.c b/src/s2d_primitive.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_scene.c b/src/s2d_scene.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_scene_c.h b/src/s2d_scene_c.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_scene_view.c b/src/s2d_scene_view.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
@@ -43,7 +43,7 @@
#include <limits.h>
struct intersect_context {
- struct RTCIntersectContext rtc;
+ struct RTCRayQueryContext rtc;
struct s2d_scene_view* scnview;
void* data; /* User defined data */
float ws_org[2]; /* World space ray origin */
@@ -730,6 +730,7 @@ scene_view_trace_ray
struct s2d_hit* hit)
{
struct RTCRayHit ray_hit;
+ struct RTCIntersectArguments intersect_args;
struct intersect_context intersect_ctx;
float dot = 1;
float dir2d[3] = {0.f, 0.f, 0.f};
@@ -803,7 +804,9 @@ scene_view_trace_ray
}
/* Initialise the intersect context */
- rtcInitIntersectContext(&intersect_ctx.rtc);
+ rtcInitIntersectArguments(&intersect_args);
+ intersect_args.context = &intersect_ctx.rtc;
+ rtcInitRayQueryContext(&intersect_ctx.rtc);
intersect_ctx.ws_org[0] = org[0];
intersect_ctx.ws_org[1] = org[1];
intersect_ctx.ws_dir[0] = dir[0];
@@ -817,7 +820,7 @@ scene_view_trace_ray
intersect_ctx.cos_dir_dir2d = dot;
/* Here we go */
- rtcIntersect1(scnview->rtc_scn, &intersect_ctx.rtc, &ray_hit);
+ rtcIntersect1(scnview->rtc_scn, &ray_hit, &intersect_args);
hit_setup(scnview, &ray_hit, hit);
diff --git a/src/s2d_scene_view_c.h b/src/s2d_scene_view_c.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_scene_view_closest_point.c b/src/s2d_scene_view_closest_point.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_shape.c b/src/s2d_shape.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/s2d_shape_c.h b/src/s2d_shape_c.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_closest_point.c b/src/test_s2d_closest_point.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_device.c b/src/test_s2d_device.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_primitive.c b/src/test_s2d_primitive.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_raytrace.c b/src/test_s2d_raytrace.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_sample.c b/src/test_s2d_sample.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_scene.c b/src/test_s2d_scene.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_scene_view.c b/src/test_s2d_scene_view.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_scene_view2.c b/src/test_s2d_scene_view2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_shape.c b/src/test_s2d_shape.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_trace_ray.c b/src/test_s2d_trace_ray.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_trace_ray_3d.c b/src/test_s2d_trace_ray_3d.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
diff --git a/src/test_s2d_utils.h b/src/test_s2d_utils.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2021 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com)
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,