From fb08353f3864c512e20822e802f24bb1b827f28f Mon Sep 17 00:00:00 2001 From: Chris Blackbourn Date: Thu, 2 Jun 2022 09:48:53 +1000 Subject: Cleanup: replace ParamBool and PBool with bool for GEO_uv API Also improve const correctness and type correctness. Reviewed By: brecht Ref D15075 --- source/blender/geometry/GEO_uv_parametrizer.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'source/blender/geometry/GEO_uv_parametrizer.h') diff --git a/source/blender/geometry/GEO_uv_parametrizer.h b/source/blender/geometry/GEO_uv_parametrizer.h index 38121646cd5..7fe60a3a855 100644 --- a/source/blender/geometry/GEO_uv_parametrizer.h +++ b/source/blender/geometry/GEO_uv_parametrizer.h @@ -14,10 +14,6 @@ extern "C" { typedef struct ParamHandle ParamHandle; /* Handle to an array of charts. */ typedef intptr_t ParamKey; /* Key (hash) for identifying verts and faces. */ -typedef enum ParamBool { - PARAM_TRUE = 1, - PARAM_FALSE = 0, -} ParamBool; /* -------------------------------------------------------------------- */ /** \name Chart Construction: @@ -39,19 +35,19 @@ ParamHandle *GEO_uv_parametrizer_construct_begin(void); void GEO_uv_parametrizer_aspect_ratio(ParamHandle *handle, float aspx, float aspy); void GEO_uv_parametrizer_face_add(ParamHandle *handle, - ParamKey key, - int nverts, - ParamKey *vkeys, - float *co[4], - float *uv[4], - ParamBool *pin, - ParamBool *select); + const ParamKey key, + const int nverts, + const ParamKey *vkeys, + const float **co, + float **uv, /* Output will eventually be written to `uv`. */ + const bool *pin, + const bool *select); void GEO_uv_parametrizer_edge_set_seam(ParamHandle *handle, ParamKey *vkeys); void GEO_uv_parametrizer_construct_end(ParamHandle *handle, - ParamBool fill, - ParamBool topology_from_uvs, + bool fill, + bool topology_from_uvs, int *count_fail); void GEO_uv_parametrizer_delete(ParamHandle *handle); @@ -70,7 +66,7 @@ void GEO_uv_parametrizer_delete(ParamHandle *handle); * * \{ */ -void GEO_uv_parametrizer_lscm_begin(ParamHandle *handle, ParamBool live, ParamBool abf); +void GEO_uv_parametrizer_lscm_begin(ParamHandle *handle, bool live, bool abf); void GEO_uv_parametrizer_lscm_solve(ParamHandle *handle, int *count_changed, int *count_failed); void GEO_uv_parametrizer_lscm_end(ParamHandle *handle); -- cgit v1.2.3