Star-2D Manage 2D geometries
Star-2D 0.5.1 is available
- Get source code: git
The Star-2D library implements the functionalities provided by Star-3D for 2D shapes represented by a list of segments. It is actually the counterpart of Star-3D for 2D geometries. Its main targets are programmers that have to deal with complex 2D environments.
The Star-2D API is roughly the same of the Star-3D one. It provides uniform sampling and ray-tracing operators while still relying on Intel(R) Rendering Framework: Embree to ensure high ray-tracing efficiency.
It also supports multiple scene views. Each view stores the current data of a scene that can be then sampled and ray-traced. A view is insensitive to scene updates following its creation. This means that several views can store different state of a same scene, giving to the caller a great flexibility to manage its geometric data.
Release notes
Version 0.5.1
- Corrects an invalid memory read.
- Fix compilation warnings detected by gcc 11.
Version 0.5
Update the API of the filtering function: add the range of the ray as input argument. For closest point queries, this range is from 0 to query radius.
Vesion 0.4.1
- Improve the accuracy of the closest point query.
- Fix the closest point query: the returned hit was wrong.
- Fix the barycentric coordinates of the intersection of the ray onto the segment: the coordinates could lie outside the segment.
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 regularS2D_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 error while it shouldn't.
Version 0.3
- Migrate the ray-tracing backend from Embree2 to Embree3.
Version 0.2
- Add the
s2d_segment_get_vertex_attrib
function that returns the vertex attributes of a given segment.
Version 0.1.1
- Fix the
s2d_primitive_get_function
. The function failed when the submitted parametric coordinate was equal to 1.
Version 0.1
- Implement the
s2d_scene_view
API; it replaces thes2d_scene_<begin|end>_session
functions that were removed. A view registers the state of the scene from which it is created. It is used to retrieve the scene data through ray-tracing, sampling or indexing. Several views can be created on the same scene. - Add the possibility to attach a same shape to several scenes.
License
Copyright © 2016-2021 |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.