Revision: 53351 http://brlcad.svn.sourceforge.net/brlcad/?rev=53351&view=rev Author: brlcad Date: 2012-10-25 12:17:14 +0000 (Thu, 25 Oct 2012) Log Message: ----------- more fastf_t / double consistency conversions to support single and double precision.
Modified Paths: -------------- brlcad/trunk/src/conv/comgeom/solid.c brlcad/trunk/src/lgt/do_options.c brlcad/trunk/src/lgt/extern.h brlcad/trunk/src/lgt/lgt.h brlcad/trunk/src/lgt/reflect.c brlcad/trunk/src/mged/clone.c brlcad/trunk/src/nirt/read_mat.c brlcad/trunk/src/proc-db/pipe.c brlcad/trunk/src/proc-db/sphflake.c brlcad/trunk/src/remrt/remrt.c brlcad/trunk/src/rt/read-rtlog.c brlcad/trunk/src/shapes/fence.c Modified: brlcad/trunk/src/conv/comgeom/solid.c =================================================================== --- brlcad/trunk/src/conv/comgeom/solid.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/conv/comgeom/solid.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -81,10 +81,10 @@ * -1 failure */ int -getsoldata(double *dp, int num, int solid_num) +getsoldata(fastf_t *dp, int num, int solid_num) { int cd; - double *fp; + fastf_t *fp; int i; int j; @@ -131,10 +131,10 @@ * -1 failure */ int -getxsoldata(double *dp, int num, int solid_num) +getxsoldata(fastf_t *dp, int num, int solid_num) { int cd; - double *fp; + fastf_t *fp; int i; int j; @@ -567,7 +567,7 @@ int numpts; /* points per wire */ int num; double dia; - double *pts; /* 3 entries per pt */ + fastf_t *pts; /* 3 entries per pt */ struct wdb_pipept *ps; struct bu_list head; /* allow a whole struct for head */ @@ -576,7 +576,7 @@ num = numpts * 3 + 1; /* 3 entries per pt */ /* allocate space for the points array */ - pts = (double *)bu_malloc(num * sizeof(double), "pts"); + pts = (fastf_t *)bu_malloc(num * sizeof(fastf_t), "pts"); if (getsoldata(pts, num, sol_work) < 0) { bu_free(name, "name"); @@ -779,8 +779,8 @@ int neq; /* # planes from equation */ int nae; /* # planes from az, el & vertex index */ int nface; /* total number of faces */ - double *input_points = (double *)0; - double *vertex = (double *)0; /* vertex list of final solid */ + fastf_t *input_points = NULL; + double *vertex = NULL; /* vertex list of final solid */ int last_vertex; /* index of first unused vertex */ int max_vertex; /* size of vertex array */ int *used = (int *)0; /* plane eqn use count */ @@ -826,11 +826,11 @@ if (npt >= 1) { /* Obtain vertex input_points */ - input_points = (double *)bu_malloc(npt*3*sizeof(double), "input_points"); + input_points = (fastf_t *)bu_malloc(npt*3*sizeof(fastf_t), "input_points"); if (getxsoldata(input_points, npt*3, sol_work) < 0) { bu_free((char *)input_points, "input_points"); - input_points = (double *)0; + input_points = NULL; goto bad; } } @@ -978,7 +978,7 @@ /* Release storage for input points */ bu_free((char *)input_points, "input_points"); - input_points = (double *)0; + input_points = NULL; /* * ARBN must be convex. Test for concavity. Modified: brlcad/trunk/src/lgt/do_options.c =================================================================== --- brlcad/trunk/src/lgt/do_options.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/lgt/do_options.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -3208,7 +3208,7 @@ /* Lights must track view, explicit light source positions not supported. */ for (i = 1; i < lgt_db_size; i++) { - fastf_t azim, elev; + double azim, elev; if (! lgts[i].over /* Fill in ptr to solid table for quick checking. */ && (lgts[i].stp = rt_find_solid(rt_ip, lgts[i].name)) != SOLTAB_NULL Modified: brlcad/trunk/src/lgt/extern.h =================================================================== --- brlcad/trunk/src/lgt/extern.h 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/lgt/extern.h 2012-10-25 12:17:14 UTC (rev 53351) @@ -39,9 +39,12 @@ extern int lgt_Print_Db(); extern int pars_Argv(); +void cons_Vector(double *vec, double azim, double elev); +void render_Model(int frame); +void render_Scan(int cpu, void *data); + extern void append_Octp(); extern void close_Output_Device(); -extern void cons_Vector(); extern void delete_OcList(); extern void display_Temps(); extern void do_line(); @@ -65,7 +68,6 @@ extern void prnt_Trie(); extern void prnt_Usage(); extern void prnt3vec(); -extern void render_Model(); extern void ring_Bell(); extern void set_IRmapping(); extern void setGridSize(); Modified: brlcad/trunk/src/lgt/lgt.h =================================================================== --- brlcad/trunk/src/lgt/lgt.h 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/lgt/lgt.h 2012-10-25 12:17:14 UTC (rev 53351) @@ -42,24 +42,24 @@ #define true 1 #define false 0 #endif -#define Swap_Integers( i_, j_ ) \ - { int k_ = i_; \ - i_ = j_; \ - j_ = k_; \ - } +#define Swap_Integers(i_, j_) \ + { int k_ = i_; \ + i_ = j_; \ + j_ = k_; \ + } #define Toggle(f) (f) = !(f) -#define Malloc_Bomb( _bytes_ ) \ - fb_log( "\"%s\"(%d) : allocation of %lu bytes failed.\n", \ - __FILE__, __LINE__, (unsigned long)(_bytes_) ) +#define Malloc_Bomb(_bytes_) \ + fb_log("\"%s\"(%d) : allocation of %lu bytes failed.\n", \ + __FILE__, __LINE__, (unsigned long)(_bytes_)) /* Guess whether or not a frame buffer name is a disk file. (XXX) */ #define DiskFile(fil) (*fil != '\0'\ - && bu_strncmp(fil, "/dev", 4 ) != 0 \ - && strchr( fil, ':' ) == (char *)NULL) + && bu_strncmp(fil, "/dev", 4) != 0 \ + && strchr(fil, ':') == (char *)NULL) /* Values for grid type. */ -#define GT_RPP_CENTERED 0 /* Grid origin aligned with centroid of model RPP. */ -#define GT_ORG_CENTERED 1 /* Grid aligned with model origin. */ +#define GT_RPP_CENTERED 0 /* Grid origin aligned with centroid of model RPP. */ +#define GT_ORG_CENTERED 1 /* Grid aligned with model origin. */ /* Flag (hiddenln_draw) values for hidden line drawing. */ #define HL_DISABLED 0 @@ -70,7 +70,7 @@ #define B_PIO 0 /* Programmed I/O. */ #define B_PAGE 1 /* Buffered I/O (DMA paging scheme). */ #define B_LINE 2 /* Line-buffered I/O (DMA). */ -#define Rotate( f ) (f) = (f) + 1 > 2 ? 0 : (f) + 1 +#define Rotate(f) (f) = (f) + 1 > 2 ? 0 : (f) + 1 /* Application debugging flags. */ #define DEBUG_RGB 0x80000 @@ -86,94 +86,94 @@ */ typedef struct { - char name[MAX_LGT_NM];/* Name of entry (i.e. ambient). */ - int beam; /* Flag denotes gaussian beam intensity. */ - int over; /* Flag denotes manual override of position. */ - int rgb[3]; /* Pixel color of LS (0 to 255) for RGB. */ - fastf_t loc[3]; /* Location of LS in model space. */ - fastf_t azim; /* Azimuthal direction of LS in radians. */ - fastf_t elev; /* Elevational direction of LS in radians. */ - fastf_t dir[3]; /* Direction vector to LS. */ - fastf_t dist; /* Distance to LS in from centroid of model. */ - fastf_t energy; /* Intensity of LS. */ - fastf_t coef[3];/* Color of LS as coefficient (0.0 to 1.0). */ - fastf_t radius; /* Radius of beam. */ - struct soltab *stp; /* Solid table pointer to LIGHT solid. */ + char name[MAX_LGT_NM];/* Name of entry (i.e. ambient). */ + int beam; /* Flag denotes gaussian beam intensity. */ + int over; /* Flag denotes manual override of position. */ + int rgb[3]; /* Pixel color of LS (0 to 255) for RGB. */ + double loc[3]; /* Location of LS in model space. */ + double azim; /* Azimuthal direction of LS in radians. */ + double elev; /* Elevational direction of LS in radians. */ + double dir[3]; /* Direction vector to LS. */ + double dist; /* Distance to LS in from centroid of model. */ + double energy; /* Intensity of LS. */ + double coef[3]; /* Color of LS as coefficient (0.0 to 1.0). */ + double radius; /* Radius of beam. */ + struct soltab *stp; /* Solid table pointer to LIGHT solid. */ } -Lgt_Source; -#define LGT_NULL (Lgt_Source *) NULL + Lgt_Source; +#define LGT_NULL (Lgt_Source *) NULL typedef struct { - int m_fullscreen; - int m_lgts; - int m_over; - int m_keys; - int m_noframes; - int m_curframe; - int m_endframe; - int m_frame_sz; - FILE *m_keys_fp; - fastf_t m_azim_beg; - fastf_t m_azim_end; - fastf_t m_elev_beg; - fastf_t m_elev_end; - fastf_t m_roll_beg; - fastf_t m_roll_end; - fastf_t m_dist_beg; - fastf_t m_dist_end; - fastf_t m_grid_beg; - fastf_t m_grid_end; - fastf_t m_pers_beg; - fastf_t m_pers_end; + int m_fullscreen; + int m_lgts; + int m_over; + int m_keys; + int m_noframes; + int m_curframe; + int m_endframe; + int m_frame_sz; + FILE *m_keys_fp; + double m_azim_beg; + double m_azim_end; + double m_elev_beg; + double m_elev_end; + double m_roll_beg; + double m_roll_end; + double m_dist_beg; + double m_dist_end; + double m_grid_beg; + double m_grid_end; + double m_pers_beg; + double m_pers_end; } -Movie; -#define MovieSize( sz, nf ) (int)sqrt((double)(nf)+0.5)*(sz) + Movie; +#define MovieSize(sz, nf) (int)sqrt((double)(nf)+0.5)*(sz) #define IK_INTENSITY 255.0 #define RGB_INVERSE (1.0 / IK_INTENSITY) #define EYE_SIZE 12.7 #define TITLE_LEN 72 #define TIMER_LEN 72 -extern Lgt_Source lgts[]; -extern Movie movie; +extern Lgt_Source lgts[]; +extern Movie movie; #endif /* INCL_LGT */ -char *get_Input(); -int setup_Lgts(); -void user_Input(); -int interpolate_Frame(); -int ready_Output_Device(); -int exec_Shell(); -void set_Cbreak(); -void clr_Echo(); -int pixel_To_Temp(); -void reset_Tty(); -int read_IR(); -int write_Trie(); -int lgt_Save_Db(); -int read_Trie(); -int lgt_Rd_Db(); -int ClrText(); -int MvCursor(); -int InitTermCap(); -int SetScrlReg(); -int ClrEOL(); -int ResetScrlReg(); -int DeleteLn(); -int init_Temp_To_RGB(); -int do_More(); -int append_PtList(); -int delete_Node_OcList(); -int SetStandout(); -int ClrStandout(); -int save_Tty(); -int set_Raw(); -int ir_shootray_octree(); -int ir_Chk_Table(); -int tex_Entry(); -int icon_Entry(); -int write_Octree(); +char *get_Input(); +int setup_Lgts(); +void user_Input(); +int interpolate_Frame(); +int ready_Output_Device(); +int exec_Shell(); +void set_Cbreak(); +void clr_Echo(); +int pixel_To_Temp(); +void reset_Tty(); +int read_IR(); +int write_Trie(); +int lgt_Save_Db(); +int read_Trie(); +int lgt_Rd_Db(); +int ClrText(); +int MvCursor(); +int InitTermCap(); +int SetScrlReg(); +int ClrEOL(); +int ResetScrlReg(); +int DeleteLn(); +int init_Temp_To_RGB(); +int do_More(); +int append_PtList(); +int delete_Node_OcList(); +int SetStandout(); +int ClrStandout(); +int save_Tty(); +int set_Raw(); +int ir_shootray_octree(); +int ir_Chk_Table(); +int tex_Entry(); +int icon_Entry(); +int write_Octree(); /* Modified: brlcad/trunk/src/lgt/reflect.c =================================================================== --- brlcad/trunk/src/lgt/reflect.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/lgt/reflect.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -216,9 +216,6 @@ static void glass_Refract(struct application *ap, struct partition *pp, Mat_Db_Entry *entry, fastf_t *normal); static void view_pix(struct application *ap, RGBpixel (*scanbuf), vect_t (*aliasbuf)), view_bol(struct application *ap), view_eol(struct application *ap, RGBpixel (*scanbuf)), view_end(void); -void cons_Vector(fastf_t *vec, fastf_t azim, fastf_t elev); -void render_Model(int frame); -void render_Scan(int cpu, void *data); /* void getCellSize(int gsize) @@ -981,7 +978,7 @@ object(s). */ if (lgt_entry->beam) { /* Apply gaussian intensity distribution. */ - fastf_t lgt_cntr[3]; + double lgt_cntr[3]; fastf_t ang_dist, rel_radius; fastf_t cos_angl; fastf_t gauss_Wgt_Func(fastf_t R); @@ -1607,16 +1604,14 @@ /* - void cons_Vector(fastf_t *vec, fastf_t azim, fastf_t elev) - Construct a direction vector out of azimuth and elevation angles in radians, allocating storage for it and returning its address. */ void -cons_Vector(fastf_t *vec, fastf_t azim, fastf_t elev) +cons_Vector(double *vec, double azim, double elev) { /* Store cosine of the elevation to save calculating twice. */ - fastf_t cosE; + double cosE; cosE = cos(elev); vec[0] = cos(azim) * cosE; vec[1] = sin(azim) * cosE; Modified: brlcad/trunk/src/mged/clone.c =================================================================== --- brlcad/trunk/src/mged/clone.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/mged/clone.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -942,11 +942,16 @@ /* Read in links names and link lengths **********/ links = (struct link *)malloc(sizeof(struct link)*n_links); for (i = arg; i < (size_t)argc; i+=2) { + double scan; + bu_vls_strcpy(&links[(i-arg)/2].name, argv[i]); - if (argc > arg+1) - sscanf(argv[i+1], "%lf", &links[(i-arg)/2].pct); - else + if (argc > arg+1) { + sscanf(argv[i+1], "%lf", &scan); + /* double to fastf_t */ + links[(i-arg)/2].pct = scan; + } else { links[(i-arg)/2].pct = 1.0; + } totlen += links[(i-arg)/2].pct; } if (!ZERO(totlen - 1.0)) Modified: brlcad/trunk/src/nirt/read_mat.c =================================================================== --- brlcad/trunk/src/nirt/read_mat.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/nirt/read_mat.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -56,27 +56,28 @@ */ void read_mat (struct rt_i *rtip) { + double scan[16] = MAT_INIT_ZERO; char *buf; int status = 0x0; mat_t m; - point_t p; - quat_t q; + mat_t q; while ((buf = rt_read_cmd(stdin)) != (char *) 0) { if (bu_strncmp(buf, "eye_pt", 6) == 0) { - if (sscanf(buf + 6, "%lf%lf%lf", &p[X], &p[Y], &p[Z]) != 3) { + if (sscanf(buf + 6, "%lf%lf%lf", &scan[X], &scan[Y], &scan[Z]) != 3) { bu_exit(1, "nirt: read_mat(): Failed to read eye_pt\n"); } - target(X) = p[X]; - target(Y) = p[Y]; - target(Z) = p[Z]; + target(X) = scan[X]; + target(Y) = scan[Y]; + target(Z) = scan[Z]; status |= RMAT_SAW_EYE; } else if (bu_strncmp(buf, "orientation", 11) == 0) { if (sscanf(buf + 11, "%lf%lf%lf%lf", - &q[0], &q[1], &q[2], &q[3]) != 4) { + &scan[X], &scan[Y], &scan[Z], &scan[W]) != 4) { bu_exit(1, "nirt: read_mat(): Failed to read orientation\n"); } + MAT_COPY(q, scan); quat_quat2mat(m, q); if (nirt_debug & DEBUG_MAT) bn_mat_print("view matrix", m); @@ -86,12 +87,13 @@ } else if (bu_strncmp(buf, "viewrot", 7) == 0) { if (sscanf(buf + 7, "%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf", - &m[0], &m[1], &m[2], &m[3], - &m[4], &m[5], &m[6], &m[7], - &m[8], &m[9], &m[10], &m[11], - &m[12], &m[13], &m[14], &m[15]) != 16) { + &scan[0], &scan[1], &scan[2], &scan[3], + &scan[4], &scan[5], &scan[6], &scan[7], + &scan[8], &scan[9], &scan[10], &scan[11], + &scan[12], &scan[13], &scan[14], &scan[15]) != 16) { bu_exit(1, "nirt: read_mat(): Failed to read viewrot\n"); } + MAT_COPY(m, scan); if (nirt_debug & DEBUG_MAT) bn_mat_print("view matrix", m); azimuth() = atan2(-m[0], m[1]) / DEG2RAD; Modified: brlcad/trunk/src/proc-db/pipe.c =================================================================== --- brlcad/trunk/src/proc-db/pipe.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/proc-db/pipe.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -115,7 +115,7 @@ Readpoints(void) { struct points *ptr, *prev; - fastf_t x, y, z; + double x, y, z; ptr = root; prev = NULL; Modified: brlcad/trunk/src/proc-db/sphflake.c =================================================================== --- brlcad/trunk/src/proc-db/sphflake.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/proc-db/sphflake.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -299,7 +299,9 @@ len = strlen(input); if ((len > 0) && (input[len-1] == '\n')) input[len-1] = 0; if (bu_strncmp(input, "", MAX_INPUT_LENGTH) == 0) { - sscanf(input, "%lg %lg %lg", &(p->pos[X]), &(p->pos[Y]), &(p->pos[Z])); + double scan[3]; + sscanf(input, "%lg %lg %lg", &scan[X], &scan[Y], &scan[Z]); + VMOVE(p->pos, scan); /* double to fastf_t */ } } fflush(stdin); Modified: brlcad/trunk/src/remrt/remrt.c =================================================================== --- brlcad/trunk/src/remrt/remrt.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/remrt/remrt.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -341,7 +341,7 @@ /* variables shared with viewing model */ extern double AmbientIntensity; -extern double azimuth, elevation; +extern fastf_t azimuth, elevation; extern int lightmodel; extern int use_air; Modified: brlcad/trunk/src/rt/read-rtlog.c =================================================================== --- brlcad/trunk/src/rt/read-rtlog.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/rt/read-rtlog.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -70,6 +70,7 @@ int seen_orientation; int seen_eye_pos; int seen_size; + double scan[4] = HINIT_ZERO; mat_t rotate, xlate; @@ -185,7 +186,10 @@ */ if (BU_STR_EQUAL(string, "View")) { - num = sscanf(arg_ptr, "%lf %9s %lf", &azimuth, forget_it, &elevation); + num = sscanf(arg_ptr, "%lf %9s %lf", &scan[X], forget_it, &scan[Y]); + /* double to fastf_t */ + azimuth = scan[X]; + elevation = scan[Y]; if (num != 3) { fprintf(stderr, "View= %.6f %s %.6f elevation\n", azimuth, forget_it, elevation); fclose(fp); @@ -193,9 +197,8 @@ } seen_view = 1; } else if (BU_STR_EQUAL(string, "Orientation")) { - num = sscanf(arg_ptr, "%lf, %lf, %lf, %lf", - &orientation[0], &orientation[1], &orientation[2], - &orientation[3]); + num = sscanf(arg_ptr, "%lf, %lf, %lf, %lf", &scan[X], &scan[Y], &scan[Z], &scan[W]); + HMOVE(orientation, scan); /* double to fastf_t */ if (num != 4) { fprintf(stderr, "Orientation= %.6f, %.6f, %.6f, %.6f\n", @@ -205,8 +208,8 @@ } seen_orientation = 1; } else if (BU_STR_EQUAL(string, "Eye_pos")) { - num = sscanf(arg_ptr, "%lf, %lf, %lf", &eye_pos[0], - &eye_pos[1], &eye_pos[2]); + num = sscanf(arg_ptr, "%lf, %lf, %lf", &scan[X], &scan[Y], &scan[Z]); + VMOVE(eye_pos, scan); /* double to fastf_t */ if (num != 3) { fprintf(stderr, "Eye_pos= %.6f, %.6f, %.6f\n", V3ARGS(eye_pos)); @@ -215,7 +218,8 @@ } seen_eye_pos = 1; } else if (BU_STR_EQUAL(string, "Size")) { - num = sscanf(arg_ptr, "%lf", &m_size); + num = sscanf(arg_ptr, "%lf", &scan[X]); + m_size = scan[X]; if (num != 1) { fprintf(stderr, "Size=%.6f\n", m_size); fclose(fp); Modified: brlcad/trunk/src/shapes/fence.c =================================================================== --- brlcad/trunk/src/shapes/fence.c 2012-10-25 12:15:03 UTC (rev 53350) +++ brlcad/trunk/src/shapes/fence.c 2012-10-25 12:17:14 UTC (rev 53351) @@ -278,6 +278,8 @@ bu_opterr = 0; while ((c=bu_getopt(argc, argv, options)) != -1) { + double scan[3] = VINIT_ZERO; + switch (c) { case 'I' : interactive=(DEFAULT_INTERACTIVE) ? 0 : 1; @@ -331,10 +333,11 @@ break; case 'h' : - if ((sscanf(bu_optarg, "%lf %lf %lf", &fenceHeight[0], &fenceHeight[1], &fenceHeight[2]))!=3) { + if ((sscanf(bu_optarg, "%lf %lf %lf", &scan[0], &scan[1], &scan[2]))!=3) { (void)argumentHelp(DEFAULT_VERBOSE_OUTPUT, progname, "Invalid number of parameters to height: need x, y, z values"); bu_exit(1, NULL); } + VMOVE(fenceHeight, scan); /* double to fastf_t */ if (ZERO((double)MAGNITUDE(fenceHeight))) { (void)argumentHelp(DEFAULT_VERBOSE_OUTPUT, progname, "Fence height may not be set to zero"); bu_exit(1, NULL); @@ -356,10 +359,11 @@ break; case 'l' : - if ((sscanf(bu_optarg, "%lf %lf %lf", &fenceWidth[0], &fenceWidth[1], &fenceWidth[2]))!=3) { + if ((sscanf(bu_optarg, "%lf %lf %lf", &scan[0], &scan[1], &scan[2]))!=3) { (void)argumentHelp(DEFAULT_VERBOSE_OUTPUT, progname, "Invalid number of parameters to width: need x, y, z values"); bu_exit(1, NULL); } + VMOVE(fenceWidth, scan); /* double to fastf_t */ if (ZERO((double)MAGNITUDE(fenceWidth))) { (void)argumentHelp(DEFAULT_VERBOSE_OUTPUT, progname, "Fence width may not be set to zero"); bu_exit(1, NULL); @@ -1820,6 +1824,7 @@ size_t len = 0; char *verboseinput; int colorinput[3]; + double scan[3] = VINIT_ZERO; verboseinput = (char *) bu_calloc(DEFAULT_MAXNAMELENGTH * 3, sizeof(char), "verboseinput"); @@ -1881,7 +1886,8 @@ fprintf(DEFAULT_DEBUG_OUTPUT, "main:entered [%s] for start position\n", verboseinput); } if (!BU_STR_EQUAL(verboseinput, "")) { - sscanf(verboseinput, "%lf%lf%lf", &fenceStartPosition[0], &fenceStartPosition[1], &fenceStartPosition[2]); + sscanf(verboseinput, "%lf%lf%lf", &scan[0], &scan[1], &scan[2]); + VMOVE(fenceStartPosition, scan); /* double to fastf_t */ } } memset(verboseinput, 0, DEFAULT_MAXNAMELENGTH*3); @@ -1897,7 +1903,8 @@ fprintf(DEFAULT_DEBUG_OUTPUT, "main:entered [%s] for end position\n", verboseinput); } if (!BU_STR_EQUAL(verboseinput, "")) { - sscanf(verboseinput, "%lf%lf%lf", &fenceEndPosition[0], &fenceEndPosition[1], &fenceEndPosition[2]); + sscanf(verboseinput, "%lf%lf%lf", &scan[0], &scan[1], &scan[2]); + VMOVE(fenceEndPosition, scan); /* double to fastf_t */ } } memset(verboseinput, 0, DEFAULT_MAXNAMELENGTH*3); @@ -1913,7 +1920,8 @@ fprintf(DEFAULT_DEBUG_OUTPUT, "main:entered [%s] for fence height\n", verboseinput); } if (!BU_STR_EQUAL(verboseinput, "")) { - sscanf(verboseinput, "%lf%lf%lf", &fenceHeight[0], &fenceHeight[1], &fenceHeight[2]); + sscanf(verboseinput, "%lf%lf%lf", &scan[0], &scan[1], &scan[2]); + VMOVE(fenceHeight, scan); } } memset(verboseinput, 0, DEFAULT_MAXNAMELENGTH*3); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits