commit 61bf2f7516ab20d5176f3e6f98367910c995704f
parent fb2d8f17ae5cfc786c60ba5a47f5491e01dcbadf
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 17 Sep 2020 11:32:32 +0200
Merge branch 'release_0.4' into develop
Diffstat:
31 files changed, 60 insertions(+), 46 deletions(-)
diff --git a/README.md b/README.md
@@ -2,21 +2,22 @@
## Overview
-Star-2D is a C/C++ library whose purpose is to manage a virtual 2D environment
-composed of line segments. The resulting virtual world can then be ray-traced
-and sampled, providing an efficient way to deal with geometric data of
-arbitrary 2D contents. Actually, Star-2D internally manages the 2D scene
-through 3D primitives whose Z component is assumed to be 0 or infinity. The
-scene ray-tracing can thus be performed in the XY 2D plane or in fictive 3D
-world where a line segment is actually a plane extruded to [-infinity,
-+infinity] along the Z dimension. To ensure high ray tracing efficiency, the
-Star-2D back-end heavily relies on the
-[IntelĀ® Rendering Framework](https://software.intel.com/sdvis):
-[Embree](https://embree.github.io)
-library that provides several ray-tracing kernels optimized for a wide range of
-data workloads. The target users of Star-2D are thus programmers that have to
-efficiently deal with complex 2D environment as numerical simulation engineers
-or researchers in complex systems.
+Star-2D is a C library that manages a virtual 2D environment composed of line
+segments. The resulting virtual scene can then be accessed through
+*ray-tracing*, *uniform sampling* or *closest point query*, providing an
+efficient way to deal with geometric data of arbitrary 2D contents. To ensure
+the efficiency of these operators, Star-3D internally relies on [Intel(R)
+Rendering Framework](https://software.intel.com/en-us/rendering-framework):
+[Embree](https://embree.github.io) that provides highly optimized acceleration
+structures as well as traversal kernels for a wide range of data workloads.
+
+To query the scene data one has to create a *view* of the scene. On its
+creation, the view internally builds data structures required by the
+aforementioned access operators. These data structures are built from the scene
+geometry as defined at the moment of the view creation; a view is thus
+insensitive to scene updates following its creation. This means that several
+views can be used to register different states of the same scene, giving to the
+caller a great flexibility to manage the scene data.
## Install
@@ -96,6 +97,19 @@ with `<STAR2D_INSTALL_DIR>` the install directory of Star-2D and
## Release notes
+### Version 0.4
+
+- Add the `s2d_scene_view_closest_point` function. This function retrieves the
+ closest point into the scene to a query position in a radius from ]0, INF].
+ This closest point is returned as a regular hit which means that the function
+ returns to the caller not only the distance to the query position, but also
+ the geometric primitive onto which the point lies and its location onto this
+ primitive. If no segment lies around the query position in a distance lesser
+ than the one defined by the query radius, the returned hit is invalid which
+ can be checked with the regular `S2D_HIT_NONE` macro. Finally, this function
+ supports the filter functions so that the caller can choose to discard
+ closest hits according to its own criteria.
+
### Version 0.3.1
- Fix the `s2d_segment_get_vertex_attrib` function: it could fail and return an
@@ -126,7 +140,7 @@ with `<STAR2D_INSTALL_DIR>` the install directory of Star-2D and
## License
-Copyright (C) 2016-2019 |Meso|Star> (<contact@meso-star.com>). Star-2D is free
+Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+# Copyright (C) 2016-2020 |Meso|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.h b/src/s2d.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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
diff --git a/src/s2d_buffer.h b/src/s2d_buffer.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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.h b/src/s2d_scene_view_c.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2016-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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-2019 |Meso|Star> (contact@meso-star.com)
+/* Copyright (C) 2016-2020 |Meso|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,