Revision: 52834
          http://brlcad.svn.sourceforge.net/brlcad/?rev=52834&view=rev
Author:   brlcad
Date:     2012-10-05 05:35:54 +0000 (Fri, 05 Oct 2012)
Log Message:
-----------
lots more fastf_t cleanup in support of single-precision compilation.  scan 
into double, copy into fastf_t.

Modified Paths:
--------------
    brlcad/trunk/src/burst/extern.h
    brlcad/trunk/src/burst/grid.c
    brlcad/trunk/src/burst/prnt.c
    brlcad/trunk/src/conv/asc/asc2g.c
    brlcad/trunk/src/conv/patch/patch-g.c
    brlcad/trunk/src/conv/shp/shp-g.c
    brlcad/trunk/src/conv/step/BRLCADWrapper.cpp
    brlcad/trunk/src/fb/cell-fb.c
    brlcad/trunk/src/nirt/showshot.c
    brlcad/trunk/src/rt/do.c
    brlcad/trunk/src/rt/ext.h
    brlcad/trunk/src/rt/opt.c
    brlcad/trunk/src/util/bary.c
    brlcad/trunk/src/util/terrain.c
    brlcad/trunk/src/util/xyz-pl.c

Modified: brlcad/trunk/src/burst/extern.h
===================================================================
--- brlcad/trunk/src/burst/extern.h     2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/burst/extern.h     2012-10-05 05:35:54 UTC (rev 52834)
@@ -57,7 +57,6 @@
 extern int readColors();
 extern int readIdents();
 extern int notify();
-extern int roundToInt();
 extern void closeUi();
 extern void colorPartition();
 extern void exitCleanly();
@@ -89,8 +88,6 @@
 extern void prntTimer();
 extern void prompt();
 extern void readCmdFile();
-extern void prntScr(const char *, ...);
-extern void brst_log(const char *, ...);
 extern void warning();
 extern void prntUsage();
 extern void clr_Tabs();
@@ -113,6 +110,11 @@
 extern void abort_RT();
 extern void intr_sig();
 
+/* proper prototype */
+extern void prntScr(const char *, ...);
+extern void brst_log(const char *, ...);
+extern int roundToInt(fastf_t f);
+
 extern Colors colorids;
 extern FBIO *fbiop;
 extern FILE *burstfp;

Modified: brlcad/trunk/src/burst/grid.c
===================================================================
--- brlcad/trunk/src/burst/grid.c       2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/burst/grid.c       2012-10-05 05:35:54 UTC (rev 52834)
@@ -43,7 +43,7 @@
 #define DEBUG_GRID     0
 #define DEBUG_SHOT     1
 #ifndef        EPSILON
-#define EPSILON                0.000001
+#  define EPSILON      0.000001
 #endif
 #define FABS(a)                ((a) > 0 ? (a) : -(a))
 #define AproxEq(a, b, e)       (FABS((a)-(b)) < (e))
@@ -78,11 +78,9 @@
 static int getRayOrigin();
 static int readBurst();
 static int readShot();
-static void consVector();
 static void lgtModel();
 static void view_end();
 static void view_pix();
-static void spallVec();
 
 /*
   void colorPartition(struct region *regp, int type)
@@ -960,6 +958,23 @@
 }
 
 
+/*     c o n s _ V e c t o r ()
+       Construct a direction vector out of azimuth and elevation angles
+       in radians, allocating storage for it and returning its address.
+*/
+static void
+consVector(fastf_t *vec, fastf_t azim, fastf_t elev)
+{
+    /* Store cosine of the elevation to save calculating twice. */
+    fastf_t    cosE;
+    cosE = cos(elev);
+    vec[0] = cos(azim) * cosE;
+    vec[1] = sin(azim) * cosE;
+    vec[2] = sin(elev);
+    return;
+}
+
+
 /*
   void gridInit(void)
 
@@ -1327,16 +1342,21 @@
 readBurst(fastf_t *vec)
 {
     int        items;
+    double scan[3];
+
     assert(burstfp != (FILE *) NULL);
     /* read 3D firing coordinates from input stream */
-    if ((items = fscanf(burstfp, "%lf %lf %lf", &vec[X], &vec[Y], &vec[Z])) != 
3) {
+    items = fscanf(burstfp, "%lf %lf %lf", &scan[0], &scan[1], &scan[2]);
+    VMOVE(vec, scan); /* double to fastf_t */
+    if (items != 3) {
        if (items != EOF) {
            brst_log("Fatal error: %d burst coordinates read.\n",
                     items);
            fatalerror = 1;
            return      0;
-       } else
+       } else {
            return      EOF;
+       }
     } else {
        vec[X] /= unitconv;
        vec[Y] /= unitconv;
@@ -1358,18 +1378,25 @@
 static int
 readShot(fastf_t *vec)
 {
+    double scan[3] = VINIT_ZERO;
+
     assert(shotfp != (FILE *) NULL);
+
     if (! TSTBIT(firemode, FM_3DIM)) {
        /* absence of 3D flag means 2D */
        int     items;
+
        /* read 2D firing coordinates from input stream */
-       if ((items = fscanf(shotfp, "%lf %lf", &vec[X], &vec[Y])) != 2) {
+       items = fscanf(shotfp, "%lf %lf", &scan[0], &scan[1]);
+       VMOVE(vec, scan);
+       if (items != 2) {
            if (items != EOF) {
                brst_log("Fatal error: only %d firing coordinates read.\n", 
items);
                fatalerror = 1;
                return  0;
-           } else
+           } else {
                return  EOF;
+           }
        } else {
            vec[X] /= unitconv;
            vec[Y] /= unitconv;
@@ -1378,15 +1405,18 @@
        if (TSTBIT(firemode, FM_3DIM)) {
            /* 3D coordinates */
            int items;
+
            /* read 3D firing coordinates from input stream */
-           if ((items = fscanf(shotfp, "%lf %lf %lf", &vec[X], &vec[Y], 
&vec[Z])) != 3)
-           {
+           items = fscanf(shotfp, "%lf %lf %lf", &scan[0], &scan[1], &scan[2]);
+           VMOVE(vec, scan); /* double to fastf_t */
+           if (items != 3) {
                if (items != EOF) {
                    brst_log("Fatal error: %d firing coordinates read.\n", 
items);
                    fatalerror = 1;
                    return      0;
-               } else
+               } else {
                    return      EOF;
+               }
            } else {
                vec[X] /= unitconv;
                vec[Y] /= unitconv;
@@ -1521,6 +1551,35 @@
 }
 
 
+static void
+spallVec(fastf_t *dvec, fastf_t *s_rdir, fastf_t phi, fastf_t gammaval)
+{
+    fastf_t                    cosphi = cos(phi);
+    fastf_t                    singamma = sin(gammaval);
+    fastf_t                    cosgamma = cos(gammaval);
+    fastf_t                    csgaphi, ssgaphi;
+    fastf_t                    sinphi = sin(phi);
+    fastf_t                    cosdphi[3];
+    fastf_t                    fvec[3];
+    fastf_t                    evec[3];
+
+    if (AproxEqVec(dvec, zaxis, VEC_TOL)
+       ||      AproxEqVec(dvec, negzaxis, VEC_TOL)
+       ) {
+       VMOVE(evec, xaxis);
+    } else {
+       VCROSS(evec, dvec, zaxis);
+    }
+    VCROSS(fvec, evec, dvec);
+    VSCALE(cosdphi, dvec, cosphi);
+    ssgaphi = singamma * sinphi;
+    csgaphi = cosgamma * sinphi;
+    VJOIN2(s_rdir, cosdphi, ssgaphi, evec, csgaphi, fvec);
+    VUNITIZE(s_rdir);
+    return;
+}
+
+
 static int
 burstRay()
 {
@@ -1583,52 +1642,6 @@
 }
 
 
-static void
-spallVec(fastf_t *dvec, fastf_t *s_rdir, fastf_t phi, fastf_t gammaval)
-{
-    fastf_t                    cosphi = cos(phi);
-    fastf_t                    singamma = sin(gammaval);
-    fastf_t                    cosgamma = cos(gammaval);
-    fastf_t                    csgaphi, ssgaphi;
-    fastf_t                    sinphi = sin(phi);
-    fastf_t                    cosdphi[3];
-    fastf_t                    fvec[3];
-    fastf_t                    evec[3];
-
-    if (AproxEqVec(dvec, zaxis, VEC_TOL)
-       ||      AproxEqVec(dvec, negzaxis, VEC_TOL)
-       ) {
-       VMOVE(evec, xaxis);
-    } else {
-       VCROSS(evec, dvec, zaxis);
-    }
-    VCROSS(fvec, evec, dvec);
-    VSCALE(cosdphi, dvec, cosphi);
-    ssgaphi = singamma * sinphi;
-    csgaphi = cosgamma * sinphi;
-    VJOIN2(s_rdir, cosdphi, ssgaphi, evec, csgaphi, fvec);
-    VUNITIZE(s_rdir);
-    return;
-}
-
-
-/*     c o n s _ V e c t o r ()
-       Construct a direction vector out of azimuth and elevation angles
-       in radians, allocating storage for it and returning its address.
-*/
-static void
-consVector(fastf_t *vec, fastf_t azim, fastf_t elev)
-{
-    /* Store cosine of the elevation to save calculating twice. */
-    fastf_t    cosE;
-    cosE = cos(elev);
-    vec[0] = cos(azim) * cosE;
-    vec[1] = sin(azim) * cosE;
-    vec[2] = sin(elev);
-    return;
-}
-
-
 void
 abort_RT(int UNUSED(sig))
 {

Modified: brlcad/trunk/src/burst/prnt.c
===================================================================
--- brlcad/trunk/src/burst/prnt.c       2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/burst/prnt.c       2012-10-05 05:35:54 UTC (rev 52834)
@@ -50,7 +50,6 @@
 #define FABS(a)                ((a) > 0 ? (a) : -(a))
 #define AproxEq(a, b, e)       (FABS((a)-(b)) < (e))
 
-static fastf_t getNormThickness();
 
 int
 doMore(int *linesp)
@@ -340,6 +339,60 @@
 
 
 /*
+  fastf_t getNormThickness(struct application *ap, struct partition *pp,
+  fastf_t cosobliquity, fastf_t normvec[3])
+
+  Given a partition structure with entry hit point and a private copy
+  of the associated normal vector, the current application structure
+  and the cosine of the obliquity at entry to the component, return
+  the normal thickness through the component at the given hit point.
+
+*/
+static fastf_t
+getNormThickness(struct application *ap, struct partition *pp, fastf_t 
cosobliquity, fastf_t normvec[3])
+{
+#ifdef VDEBUG
+    brst_log("getNormThickness() pp 0x%x normal %g, %g, %g\n",
+            pp, normvec[X], normvec[Y], normvec[Z]);
+#endif
+    if (AproxEq(cosobliquity, 1.0, COS_TOL)) {
+       /* Trajectory was normal to surface, so no need
+          to shoot another ray. */
+       fastf_t thickness = pp->pt_outhit->hit_dist -
+           pp->pt_inhit->hit_dist;
+#ifdef VDEBUG
+       brst_log("getNormThickness: using existing partitions.\n");
+       brst_log("\tthickness=%g dout=%g din=%g normal=%g, %g, %g\n",
+                thickness*unitconv,
+                pp->pt_outhit->hit_dist, pp->pt_inhit->hit_dist,
+                normvec[X], normvec[Y], normvec[Z]);
+#endif
+       return thickness;
+    } else {
+       /* need to shoot ray */
+       struct application a_thick;
+       struct hit *ihitp = pp->pt_inhit;
+       struct region *regp = pp->pt_regionp;
+       a_thick = *ap;
+       a_thick.a_hit = f_Normal;
+       a_thick.a_miss = f_Nerror;
+       a_thick.a_level++;
+       a_thick.a_user = regp->reg_regionid;
+       a_thick.a_purpose = "normal thickness";
+       VMOVE(a_thick.a_ray.r_pt, ihitp->hit_point);
+       VSCALE(a_thick.a_ray.r_dir, normvec, -1.0);
+       if (rt_shootray(&a_thick) == -1 && fatalerror) {
+           /* Fatal error in application routine. */
+           brst_log("Fatal error: raytracing aborted.\n");
+           return 0.0;
+       }
+       return a_thick.a_rbeam;
+    }
+    /*NOTREACHED*/
+}
+
+
+/*
   void prntSeg(struct application *ap, struct partition *cpp, int space,
   fastf_t entrynorm[3], fastf_t exitnorm[3],
   int burstflag)
@@ -573,60 +626,6 @@
 }
 
 
-/*
-  fastf_t getNormThickness(struct application *ap, struct partition *pp,
-  fastf_t cosobliquity, fastf_t normvec[3])
-
-  Given a partition structure with entry hit point and a private copy
-  of the associated normal vector, the current application structure
-  and the cosine of the obliquity at entry to the component, return
-  the normal thickness through the component at the given hit point.
-
-*/
-static fastf_t
-getNormThickness(struct application *ap, struct partition *pp, fastf_t 
cosobliquity, fastf_t normvec[3])
-{
-#ifdef VDEBUG
-    brst_log("getNormThickness() pp 0x%x normal %g, %g, %g\n",
-            pp, normvec[X], normvec[Y], normvec[Z]);
-#endif
-    if (AproxEq(cosobliquity, 1.0, COS_TOL)) {
-       /* Trajectory was normal to surface, so no need
-          to shoot another ray. */
-       fastf_t thickness = pp->pt_outhit->hit_dist -
-           pp->pt_inhit->hit_dist;
-#ifdef VDEBUG
-       brst_log("getNormThickness: using existing partitions.\n");
-       brst_log("\tthickness=%g dout=%g din=%g normal=%g, %g, %g\n",
-                thickness*unitconv,
-                pp->pt_outhit->hit_dist, pp->pt_inhit->hit_dist,
-                normvec[X], normvec[Y], normvec[Z]);
-#endif
-       return thickness;
-    } else {
-       /* need to shoot ray */
-       struct application a_thick;
-       struct hit *ihitp = pp->pt_inhit;
-       struct region *regp = pp->pt_regionp;
-       a_thick = *ap;
-       a_thick.a_hit = f_Normal;
-       a_thick.a_miss = f_Nerror;
-       a_thick.a_level++;
-       a_thick.a_user = regp->reg_regionid;
-       a_thick.a_purpose = "normal thickness";
-       VMOVE(a_thick.a_ray.r_pt, ihitp->hit_point);
-       VSCALE(a_thick.a_ray.r_dir, normvec, -1.0);
-       if (rt_shootray(&a_thick) == -1 && fatalerror) {
-           /* Fatal error in application routine. */
-           brst_log("Fatal error: raytracing aborted.\n");
-           return 0.0;
-       }
-       return a_thick.a_rbeam;
-    }
-    /*NOTREACHED*/
-}
-
-
 void
 prntDbgPartitions(struct application *ap, struct partition *pt_headp, char 
*label)
 {

Modified: brlcad/trunk/src/conv/asc/asc2g.c
===================================================================
--- brlcad/trunk/src/conv/asc/asc2g.c   2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/conv/asc/asc2g.c   2012-10-05 05:35:54 UTC (rev 52834)
@@ -1385,6 +1385,8 @@
     vect_t             height;
     double             vrad;
     double             hrad;
+    double scanvertex[3];
+    double scanheight[3];
 
 
     /* Read all the information out of the existing buffer.  Note that
@@ -1393,13 +1395,16 @@
 
     (void)sscanf(buf, "%c %200s %le %le %le %le %le %le %le %le", /* NAME_LEN 
*/
                 &ident, name,
-                &vertex[0],
-                &vertex[1],
-                &vertex[2],
-                &height[0],
-                &height[1],
-                &height[2],
+                &scanvertex[0],
+                &scanvertex[1],
+                &scanvertex[2],
+                &scanheight[0],
+                &scanheight[1],
+                &scanheight[2],
                 &vrad, &hrad);
+    /* convert double to fastf_t */
+    VMOVE(vertex, scanvertex);
+    VMOVE(height, scanheight);
 
     mk_particle(ofp, name, vertex, height, vrad, hrad);
 }
@@ -1455,9 +1460,13 @@
     /*bu_log("starting to dump eqns\n");
      */
     for (i = 0; i < neqn; i++) {
+       double scan[4];
+
        bu_fgets(buf, BUFSIZE, ifp);
        (void)sscanf(buf, "%200s %le %le %le %le", type, /* TYPE_LEN */
-                    &eqn[i][X], &eqn[i][Y], &eqn[i][Z], &eqn[i][W]);
+                    &scan[0], &scan[1], &scan[2], &scan[3]);
+       /* convert double to fastf_t */
+       HMOVE(eqn[i], scan);
     }
 
     /*bu_log("sending info to mk_arbn\n");

Modified: brlcad/trunk/src/conv/patch/patch-g.c
===================================================================
--- brlcad/trunk/src/conv/patch/patch-g.c       2012-10-05 05:03:48 UTC (rev 
52833)
+++ brlcad/trunk/src/conv/patch/patch-g.c       2012-10-05 05:35:54 UTC (rev 
52834)
@@ -3638,14 +3638,18 @@
        nread = read(fd, buf, sizeof(buf));     /* read one line of file into a 
buffer */
 
        if (nread > 0) {
+           double scan[3];
            /* For valid reads, assign values to the input array */
 
            sscanf(buf, "%lf %lf %lf %c %d %d %d %d %d %d %d %d %d %d %d %d %d 
%d",
-                  &in[i].x, &in[i].y, &in[i].z, &in[i].surf_mode, 
&in[i].surf_type,
+                  &scan[0], &scan[1], &scan[2], &in[i].surf_mode, 
&in[i].surf_type,
                   &in[i].surf_thick, &in[i].spacecode, &in[i].cc,
                   &in[i].ept[0], &in[i].ept[1], &in[i].ept[2],
                   &in[i].ept[3], &in[i].ept[4], &in[i].ept[5],
                   &in[i].ept[6], &in[i].ept[7], &in[i].mirror, &in[i].vc);
+           in[i].x = scan[0];
+           in[i].y = scan[1];
+           in[i].z = scan[2];
 
            /* Perform english to metric conversions.  */
            in[i].x = mmtin*in[i].x;

Modified: brlcad/trunk/src/conv/shp/shp-g.c
===================================================================
--- brlcad/trunk/src/conv/shp/shp-g.c   2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/conv/shp/shp-g.c   2012-10-05 05:35:54 UTC (rev 52834)
@@ -141,9 +141,11 @@
     size_t shp_num_invalid = 0;
     int shp_num_entities = 0;
     int shp_type = 0;
-    hvect_t shp_min = HINIT_ZERO;
-    hvect_t shp_max = HINIT_ZERO;
 
+    /* intentionally double for scan */
+    double shp_min[4] = HINIT_ZERO;
+    double shp_max[4] = HINIT_ZERO;
+
     /* geometry */
     point2d_t *verts = NULL;
     size_t num_verts = 0;

Modified: brlcad/trunk/src/conv/step/BRLCADWrapper.cpp
===================================================================
--- brlcad/trunk/src/conv/step/BRLCADWrapper.cpp        2012-10-05 05:03:48 UTC 
(rev 52833)
+++ brlcad/trunk/src/conv/step/BRLCADWrapper.cpp        2012-10-05 05:35:54 UTC 
(rev 52834)
@@ -76,10 +76,12 @@
 
 bool
 BRLCADWrapper::WriteSphere(double *center, double radius) {
+    point_t pnt;
     center[X] = 0.0;
     center[Y] = 0.0;
     center[Z] = 0.0;
-    mk_sph(outfp, "s1", center, radius);
+    VMOVE(pnt, center);
+    mk_sph(outfp, "s1", pnt, radius);
     return true;
 }
 

Modified: brlcad/trunk/src/fb/cell-fb.c
===================================================================
--- brlcad/trunk/src/fb/cell-fb.c       2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/fb/cell-fb.c       2012-10-05 05:35:54 UTC (rev 52834)
@@ -373,9 +373,9 @@
        double res;
 
        if (interp_flag) {
-           double prev_hsv[3];
-           double hsv[3];
-           double next_hsv[3];
+           vect_t prev_hsv;
+           vect_t hsv;
+           vect_t next_hsv;
 
            idx = val + 0.01; /* convert to range [0 to 10] */
            if ((rem = val - (double) idx) < 0.0) /* remainder */
@@ -595,7 +595,8 @@
 
 #if BLEND_USING_HSV
 
-    double lo_hsv[3], hi_hsv[3], hsv[3];
+    fastf_t lo_hsv[3], hi_hsv[3];
+    fastf_t hsv[3];
 
     bu_rgb_to_hsv(lo_rgb, lo_hsv);
     bu_rgb_to_hsv(hi_rgb, hi_hsv);
@@ -691,12 +692,16 @@
            case 'a': {
                fastf_t h;
                fastf_t v;
+               double scan[2];
                struct locrec *lrp;
 
-               if (sscanf(bu_optarg, "%lf %lf", &h, &v) != 2) {
+               if (sscanf(bu_optarg, "%lf %lf", &scan[0], &scan[1]) != 2) {
                    bu_log("Invalid grid-plane location: '%s'\n", bu_optarg);
                    return 0;
                }
+               /* double to fastf_t */
+               h = scan[0];
+               v = scan[1];
                lrp = mk_locrec(h, v);
                BU_LIST_INSERT(&(gp_locs.l), &(lrp->l));
            }

Modified: brlcad/trunk/src/nirt/showshot.c
===================================================================
--- brlcad/trunk/src/nirt/showshot.c    2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/nirt/showshot.c    2012-10-05 05:35:54 UTC (rev 52834)
@@ -49,15 +49,17 @@
     char *nlp;                 /* Location of newline in buf */
     char rname[BUF_LEN];       /* Name of current region */
     char rayname[BUF_LEN];     /* Name of ray */
-    fastf_t ray_radius = 1.0;  /* Thickness of the RCC */
     int i;                     /* Index into rname */
     int line_nm = 0;           /* Number of current line of input */
     int opt;                   /* Command-line option returned by bu_getopt */
     int pid;                   /* Process ID for unique group name */
-    point_t entryp = VINIT_ZERO;       /* Ray's entry into current region */
-    point_t exitp = VINIT_ZERO;                /* Ray's exit from current 
region */
     point_t first_entryp = VINIT_ZERO; /* Ray's entry into the entire geometry 
*/
 
+    /* intentionally double for scan */
+    double ray_radius = 1.0;   /* Thickness of the RCC */
+    double entryp[3] = VINIT_ZERO;     /* Ray's entry into current region */
+    double exitp[3] = VINIT_ZERO;              /* Ray's exit from current 
region */
+
     pid = bu_process_id();
 
     *rayname = '\0';

Modified: brlcad/trunk/src/rt/do.c
===================================================================
--- brlcad/trunk/src/rt/do.c    2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/rt/do.c    2012-10-05 05:35:54 UTC (rev 52834)
@@ -52,7 +52,6 @@
 
 /***** Variables shared with viewing model *** */
 extern FILE *outfp;                    /* optional pixel output file */
-extern double azimuth, elevation;
 extern mat_t view2model;
 extern mat_t model2view;
 /***** end of sharing with viewing model *****/

Modified: brlcad/trunk/src/rt/ext.h
===================================================================
--- brlcad/trunk/src/rt/ext.h   2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/rt/ext.h   2012-10-05 05:35:54 UTC (rev 52834)
@@ -27,7 +27,7 @@
 
 /***** Variables declared in opt.c *****/
 extern char *framebuffer;              /* desired framebuffer */
-extern double azimuth, elevation;
+extern fastf_t azimuth, elevation;
 extern double nu_gfactor;              /* constant factor in NUgrid algorithm 
*/
 extern int Query_one_pixel;
 extern int benchmark;

Modified: brlcad/trunk/src/rt/opt.c
===================================================================
--- brlcad/trunk/src/rt/opt.c   2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/rt/opt.c   2012-10-05 05:35:54 UTC (rev 52834)
@@ -53,7 +53,7 @@
 
 /***** Variables shared with viewing model *** */
 int            doubles_out = 0;        /* u_char or double .pix output file */
-double         azimuth = 0.0, elevation = 0.0;
+fastf_t                azimuth = 0.0, elevation = 0.0;
 int            lightmodel = 0;         /* Select lighting model */
 int            rpt_overlap = 1;        /* report overlapping region names */
 int            default_background = 1; /* Default is black */
@@ -239,13 +239,14 @@
            case 'k':      /* define cutting plane */
            {
                fastf_t f;
+               double scan[4];
 
                do_kut_plane = 1;
-               i = sscanf(bu_optarg, "%lg,%lg,%lg,%lg",
-                          &kut_plane[X], &kut_plane[Y], &kut_plane[Z], 
&kut_plane[H]);
+               i = sscanf(bu_optarg, "%lg,%lg,%lg,%lg", &scan[0], &scan[1], 
&scan[2], &scan[3]);
                if( i != 4 ) {
                    bu_exit( EXIT_FAILURE, "ERROR: bad cutting plane\n" );
                }
+               HMOVE(kut_plane, scan); /* double to fastf_t */
 
                /* verify that normal has unit length */
                f = MAGNITUDE( kut_plane );

Modified: brlcad/trunk/src/util/bary.c
===================================================================
--- brlcad/trunk/src/util/bary.c        2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/util/bary.c        2012-10-05 05:35:54 UTC (rev 52834)
@@ -142,12 +142,14 @@
     int nm_sites;
     int normalize = 0; /* Make all weights sum to one? */
     fastf_t *coeff;
-    fastf_t x, y, z;
     FILE *infp = NULL;
     struct bu_list site_list;
     struct bu_vls *tail_buf = 0;
     struct site *sp;
 
+    /* intentionally double for scan */
+    double x, y, z;
+
     BU_LIST_INIT(&site_list);
     while ((ch = bu_getopt(argc, argv, OPT_STRING)) != -1)
        switch (ch) {

Modified: brlcad/trunk/src/util/terrain.c
===================================================================
--- brlcad/trunk/src/util/terrain.c     2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/util/terrain.c     2012-10-05 05:35:54 UTC (rev 52834)
@@ -59,11 +59,13 @@
 double fbm_h = 1.0;
 double fbm_octaves = 7.0;
 double fbm_size = 1.0;
-vect_t fbm_vscale = {0.0125, 0.0125, 0.0125};
-vect_t fbm_delta = {1000.0, 1000.0, 1000.0};
 double fbm_offset = 1.0;
+
+/* intentionally double for scan */
+double fbm_vscale[3] = {0.0125, 0.0125, 0.0125};
+double fbm_delta[3] = {1000.0, 1000.0, 1000.0};
+
 int quiet = 0;
-
 int debug;
 
 /* transform a point in integer X, Y, Z space to appropriate noise space */

Modified: brlcad/trunk/src/util/xyz-pl.c
===================================================================
--- brlcad/trunk/src/util/xyz-pl.c      2012-10-05 05:03:48 UTC (rev 52833)
+++ brlcad/trunk/src/util/xyz-pl.c      2012-10-05 05:35:54 UTC (rev 52834)
@@ -49,6 +49,8 @@
        bu_exit(1, "%s: unexpected argument(s)\n", argv[0]);
 
     for (;;) {
+       point_t pnt;
+
        xyz[0] = xyz[1] = xyz[2] = 0.0;
 
        buf[0] = '\0';
@@ -63,11 +65,13 @@
        }
        if (i <= 0)
            break;
+
+       VMOVE(pnt, xyz); /* double to fastf_t */
        if (first) {
            first = 0;
-           pdv_3move(stdout, xyz);
+           pdv_3move(stdout, pnt);
        } else {
-           pdv_3cont(stdout, xyz);
+           pdv_3cont(stdout, pnt);
        }
     }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to