star-2d

Contour structuring for efficient 2D geometric queries
git clone git://git.meso-star.fr/star-2d.git
Log | Files | Refs | README | LICENSE

commit 9c2f3d3e5cf55f9ed0f3f13c1b5781e8d0a4b9cb
parent dcebd01e7c51f4942361416f7a7ab9479e27648b
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu,  7 Jul 2016 17:20:01 +0200

Update the RSys dependency version to 0.4

Diffstat:
Mcmake/CMakeLists.txt | 2+-
Msrc/s2d_scene.c | 38+++++++++++++++++++-------------------
2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -38,7 +38,7 @@ option(NO_TEST "Disable the test" OFF) ################################################################################ find_package(Embree 2.9 REQUIRED) find_package(RCMake 0.2.2 REQUIRED) -find_package(RSys 0.2.1 REQUIRED) +find_package(RSys 0.4.0 REQUIRED) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) include(rcmake) include(rcmake_runtime) diff --git a/src/s2d_scene.c b/src/s2d_scene.c @@ -647,7 +647,7 @@ s2d_scene_attach_shape(struct s2d_scene* scn, struct s2d_shape* shape) if(!is_list_empty(&shape->scene_attachment)) { log_error(scn->dev, "%s: Cannot attach a shape that is already attached to a scene.\n", - __FUNCTION__); + FUNC_NAME); return RES_BAD_ARG; } list_add_tail(&scn->shapes, &shape->scene_attachment); @@ -666,7 +666,7 @@ s2d_scene_detach_shape(struct s2d_scene* scn, struct s2d_shape* shape) if(!(S2D(shape_is_attached(shape, &is_attached)), is_attached)) { log_error(scn->dev, "%s: The shape to detach is not attached to any scene.\n", - __FUNCTION__); + FUNC_NAME); return RES_BAD_ARG; } #ifndef NDEBUG @@ -682,7 +682,7 @@ s2d_scene_detach_shape(struct s2d_scene* scn, struct s2d_shape* shape) ASSERT(is_found); } #endif - res = scene_detach_shape(scn, shape, __FUNCTION__); + res = scene_detach_shape(scn, shape, FUNC_NAME); if(res != RES_OK) return res; return RES_OK; @@ -696,13 +696,13 @@ s2d_scene_clear(struct s2d_scene* scn) if(scn->session_mask != 0) { log_error(scn->dev, "%s: Invalid operation. A session is active onto the scene.\n", - __FUNCTION__); + FUNC_NAME); return RES_BAD_OP; } LIST_FOR_EACH_SAFE(node, tmp, &scn->shapes) { struct s2d_shape* shape = CONTAINER_OF (node, struct s2d_shape, scene_attachment); - res_T res = scene_detach_shape(scn, shape, __FUNCTION__); + res_T res = scene_detach_shape(scn, shape, FUNC_NAME); ASSERT(res == RES_OK); (void)res; } return RES_OK; @@ -717,10 +717,10 @@ s2d_scene_begin_session(struct s2d_scene* scn, const int session_mask) && !(session_mask & S2D_GET_PRIMITIVE)) { log_error(scn->dev, "%s: Invalid session mask. No valid session is defined.\n", - __FUNCTION__); + FUNC_NAME); return RES_BAD_ARG; } - return scene_sync(scn, session_mask, __FUNCTION__); + return scene_sync(scn, session_mask, FUNC_NAME); } res_T @@ -731,7 +731,7 @@ s2d_scene_end_session(struct s2d_scene* scn) if(!scn->session_mask) { log_error(scn->dev, "%s: Cannot end session. No session is currently active onto the scene.\n", - __FUNCTION__); + FUNC_NAME); return RES_BAD_ARG; } scene_session_clear(scn); @@ -762,13 +762,13 @@ s2d_scene_trace_ray return RES_BAD_ARG; if(!f2_is_normalized(dir)) { log_error(scn->dev, - "%s: The ray direction should be normalized.\n", __FUNCTION__); + "%s: The ray direction should be normalized.\n", FUNC_NAME); return RES_BAD_ARG; } if((scn->session_mask & S2D_TRACE) == 0) { log_error(scn->dev, "%s: A S2D_TRACE session should be active onto the submitted scene.\n", - __FUNCTION__); + FUNC_NAME); return RES_BAD_OP; } if(range[0] > range[1]) { /* Degenerated range <=> disabled ray */ @@ -813,7 +813,7 @@ s2d_scene_trace_ray_3d } if(!f3_is_normalized(dir)) { log_error(scn->dev, - "%s: The ray direction should be normalized.\n", __FUNCTION__); + "%s: The ray direction should be normalized.\n", FUNC_NAME); return RES_BAD_ARG; } if((dir[0] == 0.f && dir[1] == 0.f) || range[0] > range[1]) { @@ -857,14 +857,14 @@ s2d_scene_sample if(u < 0.f || u >= 1.f || v < 0.f || v >= 1.f) { log_error(scn->dev, "%s: The submitted numbers are not canonical, i.e. they ar not in [0, 1[.\n", - __FUNCTION__); + FUNC_NAME); res = RES_BAD_ARG; goto error; } if((scn->session_mask & S2D_SAMPLE) == 0) { log_error(scn->dev, "%s: A S2D_SAMPLE session should be active onto the submitted scene.\n", - __FUNCTION__); + FUNC_NAME); res = RES_BAD_OP; goto error; } @@ -926,7 +926,7 @@ s2d_scene_get_primitive if((scn->session_mask & S2D_GET_PRIMITIVE) == 0) { log_error(scn->dev, "%s: A S2D_GET_PRIMITIVE session should be active onto the submitted scene.\n", - __FUNCTION__); + FUNC_NAME); res = RES_BAD_OP; goto error; } @@ -978,7 +978,7 @@ s2d_scene_primitives_count(struct s2d_scene* scn, size_t* prims_count) } if(!scn->session_mask) { log_error(scn->dev, - "%s: A session must be active on the submitted scene.\n", __FUNCTION__); + "%s: A session must be active on the submitted scene.\n", FUNC_NAME); res = RES_BAD_OP; goto error; } @@ -1027,7 +1027,7 @@ s2d_scene_compute_contour_length(struct s2d_scene* scn, float* out_length) if(!scn->session_mask) { log_error(scn->dev, - "%s: A session must be active on the submitted scene.\n", __FUNCTION__); + "%s: A session must be active on the submitted scene.\n", FUNC_NAME); res = RES_BAD_OP; goto error; } @@ -1085,7 +1085,7 @@ s2d_scene_compute_area(struct s2d_scene* scn, float* out_area) } if(!scn->session_mask) { log_error(scn->dev, - "%s: A session must be active on the submitted scene.\n", __FUNCTION__); + "%s: A session must be active on the submitted scene.\n", FUNC_NAME); res = RES_BAD_OP; goto error; } @@ -1104,7 +1104,7 @@ s2d_scene_compute_area(struct s2d_scene* scn, float* out_area) log_error(scn->dev, "%s: The area of the scene polygons is negative. The scene shapes might\n" " not represent closed manifold polygons, or their contour might not point\n" - " inward the polygon.\n", __FUNCTION__); + " inward the polygon.\n", FUNC_NAME); } exit: @@ -1121,7 +1121,7 @@ s2d_scene_get_aabb(struct s2d_scene* scn, float lower[2], float upper[2]) if(!scn || !lower || !upper) return RES_BAD_ARG; if(!scn->session_mask) { log_error(scn->dev, - "%s: A session must be active on the submitted scene.\n", __FUNCTION__); + "%s: A session must be active on the submitted scene.\n", FUNC_NAME); return RES_BAD_OP; } f2_set(lower, scn->lower);