[brlcad-commits] SF.net SVN: brlcad:[70424] brlcad/trunk
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2017-11-21 07:55:38
|
Revision: 70424 http://sourceforge.net/p/brlcad/code/70424 Author: brlcad Date: 2017-11-21 07:55:25 +0000 (Tue, 21 Nov 2017) Log Message: ----------- vmath.h fixes now that fastf_t is extracted from libbu. it's now treated as a stand-alone header-only single-header api, so we include it accordingly before library headers. Modified Paths: -------------- brlcad/trunk/include/bu/color.h brlcad/trunk/include/bu/hist.h brlcad/trunk/include/rt/db4.h brlcad/trunk/src/libbu/color.c brlcad/trunk/src/libbu/parse.c brlcad/trunk/src/libbu/scan.c brlcad/trunk/src/libbu/units.c brlcad/trunk/src/libdm/color.c brlcad/trunk/src/liboptical/turb.c brlcad/trunk/src/librt/primitives/arb8/arb_edit.c brlcad/trunk/src/librt/search.c brlcad/trunk/src/proc-db/naca/naca.h brlcad/trunk/src/util/bwcrop.c brlcad/trunk/src/util/pixcrop.c Modified: brlcad/trunk/include/bu/color.h =================================================================== --- brlcad/trunk/include/bu/color.h 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/include/bu/color.h 2017-11-21 07:55:25 UTC (rev 70424) @@ -23,6 +23,8 @@ #include "common.h" +#include "vmath.h" + #include "bu/defines.h" #include "bu/magic.h" Modified: brlcad/trunk/include/bu/hist.h =================================================================== --- brlcad/trunk/include/bu/hist.h 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/include/bu/hist.h 2017-11-21 07:55:25 UTC (rev 70424) @@ -24,6 +24,7 @@ #include "common.h" #include <stddef.h> /* for size_t */ +#include "vmath.h" #include "bu/defines.h" #include "bu/magic.h" Modified: brlcad/trunk/include/rt/db4.h =================================================================== --- brlcad/trunk/include/rt/db4.h 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/include/rt/db4.h 2017-11-21 07:55:25 UTC (rev 70424) @@ -66,7 +66,7 @@ #include "common.h" -#include "bu/defines.h" /* Needed only for the deprecated functions below using fastf_t */ +#include "vmath.h" /* Needed only for the deprecated functions below using fastf_t */ __BEGIN_DECLS Modified: brlcad/trunk/src/libbu/color.c =================================================================== --- brlcad/trunk/src/libbu/color.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/libbu/color.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -45,18 +45,6 @@ #define BLU 2 -/* vmath/libbu routines replicated here to avoid a libbn dependency */ -enum axis { - X = 0, - Y = 1, - Z = 2 -}; -#define VSET(a, b, c, d) { (a)[X] = (b); (a)[Y] = (c); (a)[Z] = (d); } -#define VSETALL(a, s) { (a)[X] = (a)[Y] = (a)[Z] = (s); } -#define NEAR_ZERO(val, epsilon) (((val) > -epsilon) && ((val) < epsilon)) -#define V3ARGS(a) (a)[X], (a)[Y], (a)[Z] - - void bu_rgb_to_hsv(unsigned char *rgb, fastf_t *hsv) { Modified: brlcad/trunk/src/libbu/parse.c =================================================================== --- brlcad/trunk/src/libbu/parse.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/libbu/parse.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -27,6 +27,7 @@ #include <string.h> #include <assert.h> #include <limits.h> +#include "vmath.h" #include "bu/cv.h" #include "bu/log.h" Modified: brlcad/trunk/src/libbu/scan.c =================================================================== --- brlcad/trunk/src/libbu/scan.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/libbu/scan.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -23,6 +23,7 @@ #include <stdio.h> #include <stdarg.h> #include <string.h> +#include "vmath.h" #include "bu/log.h" #include "bu/malloc.h" Modified: brlcad/trunk/src/libbu/units.c =================================================================== --- brlcad/trunk/src/libbu/units.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/libbu/units.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -32,6 +32,7 @@ #include <string.h> #include <float.h> #include <limits.h> +#include "vmath.h" #include "bu/log.h" #include "bu/malloc.h" @@ -40,11 +41,6 @@ #include "bu/vls.h" -/* done specifically to avoid a libbn dependency */ -#define NEAR_ZERO(val, epsilon) (((val) > -epsilon) && ((val) < epsilon)) -#define ZERO(val) NEAR_ZERO((val), SMALL_FASTF) - - struct cvt_tab { double val; char name[32]; Modified: brlcad/trunk/src/libdm/color.c =================================================================== --- brlcad/trunk/src/libdm/color.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/libdm/color.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -31,6 +31,7 @@ #ifdef HAVE_X11_XLIB_H # include <X11/Xlib.h> #endif +#include "vmath.h" #include "bu/malloc.h" #include "dm/dm_xvars.h" Modified: brlcad/trunk/src/liboptical/turb.c =================================================================== --- brlcad/trunk/src/liboptical/turb.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/liboptical/turb.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -12,8 +12,9 @@ #include "common.h" -#include "bu/defines.h" +#include "vmath.h" + /* TODO: it'd be useful to figure out which random number generator * created this table so we could create a substantially bigger one * while retaining these 20x20x20 values for backwards-compatibility. Modified: brlcad/trunk/src/librt/primitives/arb8/arb_edit.c =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb_edit.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/librt/primitives/arb8/arb_edit.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -30,6 +30,7 @@ #include <stdlib.h> #include <ctype.h> #include <string.h> +#include "vmath.h" #include "rt/db4.h" /* For ARB* defines */ #include "rt/arb_edit.h" Modified: brlcad/trunk/src/librt/search.c =================================================================== --- brlcad/trunk/src/librt/search.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/librt/search.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -94,6 +94,7 @@ #define __restrict /* quell gcc 4.1.2 system regex.h -pedantic-errors */ #include <sys/types.h> /* for mingw regex.h->stdio.h types */ #include <regex.h> +#include "vmath.h" #include "bu/cmd.h" #include "bu/path.h" Modified: brlcad/trunk/src/proc-db/naca/naca.h =================================================================== --- brlcad/trunk/src/proc-db/naca/naca.h 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/proc-db/naca/naca.h 2017-11-21 07:55:25 UTC (rev 70424) @@ -39,8 +39,10 @@ */ #include "common.h" -#include "bu/defines.h" +#include "vmath.h" + + /* The array in this structure should be 1-indexed */ struct fortran_array { int n; Modified: brlcad/trunk/src/util/bwcrop.c =================================================================== --- brlcad/trunk/src/util/bwcrop.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/util/bwcrop.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -36,6 +36,7 @@ #include <stdlib.h> #include <stdio.h> #include <limits.h> /* for INT_MAX */ +#include "vmath.h" #include "bu/file.h" #include "bu/malloc.h" Modified: brlcad/trunk/src/util/pixcrop.c =================================================================== --- brlcad/trunk/src/util/pixcrop.c 2017-11-21 07:51:11 UTC (rev 70423) +++ brlcad/trunk/src/util/pixcrop.c 2017-11-21 07:55:25 UTC (rev 70424) @@ -36,6 +36,7 @@ #include <stdlib.h> #include <stdio.h> #include <limits.h> /* for INT_MAX */ +#include "vmath.h" #include "bu/file.h" #include "bu/malloc.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |