star-enclosures-3d

Extract enclosures from 3D geometry
git clone git://git.meso-star.fr/star-enclosures-3d.git
Log | Files | Refs | README | LICENSE

commit c1e72f8b2c6bc560d3c2564cfc10ac44092c12e1
parent 3a39415e7b52f5803263478aebe14334d6ada621
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Tue,  6 Mar 2018 17:43:26 +0100

Increase max number of media and components.

From uint16 to int32.

Diffstat:
Msrc/senc_internal_types.h | 16++++++++--------
Msrc/senc_scene_analyze.c | 2+-
Msrc/senc_scene_analyze_c.h | 2+-
3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/senc_internal_types.h b/src/senc_internal_types.h @@ -54,17 +54,17 @@ typedef vrtx_id_t edge_id_t; #define EDGE_MAX__ VRTX_MAX__ #define EDGE_NULL__ VRTX_NULL__ -/* Medium IDs are internally uint16_t */ +/* Medium IDs are internally uint32_t */ /* Should nnot be larger than unsigned, as the API uses it. */ -typedef uint16_t medium_id_t; -#define MEDIUM_MAX__ (UINT16_MAX-1) -#define MEDIUM_NULL__ UINT16_MAX +typedef uint32_t medium_id_t; +#define MEDIUM_MAX__ INT32_MAX +#define MEDIUM_NULL__ UINT32_MAX -/* Enclosure IDs are internally uint16_t */ +/* Enclosure IDs are internally uint32_t */ /* Cannot be larger than unsigned, as the API uses it. */ -typedef uint16_t enclosure_id_t; -#define ENCLOSURE_MAX__ (UINT16_MAX-1) -#define ENCLOSURE_NULL__ UINT16_MAX +typedef uint32_t enclosure_id_t; +#define ENCLOSURE_MAX__ UINT32_MAX +#define ENCLOSURE_NULL__ UINT32_MAX /* Component IDs use the same type than enclosure IDs */ typedef enclosure_id_t component_id_t; diff --git a/src/senc_scene_analyze.c b/src/senc_scene_analyze.c @@ -184,7 +184,7 @@ extract_connex_components darray_side_id_init(alloc, &stack); #pragma omp for schedule(dynamic) - for(mm = 0; mm < scn->nmeds; mm++) { /* Process all media */ + for(mm = 0; mm < (int)scn->nmeds; mm++) { /* Process all media */ const medium_id_t m = (medium_id_t)mm; struct cc_descriptor* cc; /* Any not-already-used side is used as a starting point */ diff --git a/src/senc_scene_analyze_c.h b/src/senc_scene_analyze_c.h @@ -201,10 +201,10 @@ triangle_tmp_init(struct mem_allocator* alloc, struct triangle_tmp* trg) { #include <rsys/hash_table.h> struct neighbour_info { + double angle; trg_id_t trg_id; /* Rank of the edge in the triangle (in [0 2]) */ unsigned char edge_rank; - double angle; }; #define DARRAY_NAME neighbour #define DARRAY_DATA struct neighbour_info