Revision: 52883
http://brlcad.svn.sourceforge.net/brlcad/?rev=52883&view=rev
Author: brlcad
Date: 2012-10-09 04:20:16 +0000 (Tue, 09 Oct 2012)
Log Message:
-----------
more fastf_t/double conversions
Modified Paths:
--------------
brlcad/trunk/src/conv/comgeom/solid.c
brlcad/trunk/src/conv/jack/jack-g.c
brlcad/trunk/src/conv/nmg/asc-nmg.c
brlcad/trunk/src/conv/off/off-g.c
brlcad/trunk/src/conv/patch/patch-g.c
brlcad/trunk/src/gtools/g_lint.c
Modified: brlcad/trunk/src/conv/comgeom/solid.c
===================================================================
--- brlcad/trunk/src/conv/comgeom/solid.c 2012-10-09 04:19:34 UTC (rev
52882)
+++ brlcad/trunk/src/conv/comgeom/solid.c 2012-10-09 04:20:16 UTC (rev
52883)
@@ -203,7 +203,7 @@
vect_t work;
double m1, m2; /* Magnitude temporaries */
char *name = NULL;
- double dd[4*6]; /* 4 cards of 6 nums each */
+ fastf_t dd[4*6]; /* 4 cards of 6 nums each */
point_t tmp[8]; /* 8 vectors of 3 nums each */
int ret;
#define D(_i) (&(dd[_i*3]))
@@ -284,7 +284,7 @@
if (BU_STR_EQUAL(solid_type, "ars")) {
int ncurves;
int pts_per_curve;
- double **curve;
+ fastf_t **curve;
ncurves = getint(scard, 10, 10);
pts_per_curve = getint(scard, 20, 10);
@@ -317,7 +317,7 @@
}
if (BU_STR_EQUAL(solid_type, "rpp")) {
- double min[3], max[3];
+ fastf_t min[3], max[3];
if (getsoldata(dd, 2*3, sol_work) < 0) {
bu_free(name, "name");
Modified: brlcad/trunk/src/conv/jack/jack-g.c
===================================================================
--- brlcad/trunk/src/conv/jack/jack-g.c 2012-10-09 04:19:34 UTC (rev 52882)
+++ brlcad/trunk/src/conv/jack/jack-g.c 2012-10-09 04:20:16 UTC (rev 52883)
@@ -165,7 +165,7 @@
/* Psurf file pointer. */
/* Array of read in vertices. */
{
- fastf_t x, y, z;
+ double x, y, z;
int i;
int bomb=0;
size_t ret;
Modified: brlcad/trunk/src/conv/nmg/asc-nmg.c
===================================================================
--- brlcad/trunk/src/conv/nmg/asc-nmg.c 2012-10-09 04:19:34 UTC (rev 52882)
+++ brlcad/trunk/src/conv/nmg/asc-nmg.c 2012-10-09 04:20:16 UTC (rev 52883)
@@ -184,8 +184,8 @@
{
#define MAXV 10000
- char token[80] = {0}; /* Token read from ascii nmg file. */
- fastf_t x, y, z; /* Coordinates of a vertex. */
+ char token[80] = {0}; /* Token read from ascii nmg file. */
+ double x, y, z; /* Coordinates of a vertex. */
int dir = OT_NONE; /* Direction of face. */
int i,
lu_verts[MAXV] = {0}, /* Vertex names making up loop. */
Modified: brlcad/trunk/src/conv/off/off-g.c
===================================================================
--- brlcad/trunk/src/conv/off/off-g.c 2012-10-09 04:19:34 UTC (rev 52882)
+++ brlcad/trunk/src/conv/off/off-g.c 2012-10-09 04:20:16 UTC (rev 52883)
@@ -71,8 +71,13 @@
/* Read in vertex geometry, store in geometry list */
for (i = 0; i < nverts; i++) {
- if (fscanf(fgeom, "%lf %lf %lf", &pts[3*i], &pts[3*i+1], &pts[3*i+2])
!= 3)
+ double scan[3];
+ if (fscanf(fgeom, "%lf %lf %lf", &scan[0], &scan[1], &scan[2]) != 3) {
bu_exit(1, "Not enough data points in geometry file.\n");
+ }
+ pts[3*i] = scan[0];
+ pts[3*i+1] = scan[1];
+ pts[3*i+2] = scan[2];
verts[i] = (struct vertex *) 0;
ret = fscanf(fgeom, "%*[^\n]");
Modified: brlcad/trunk/src/conv/patch/patch-g.c
===================================================================
--- brlcad/trunk/src/conv/patch/patch-g.c 2012-10-09 04:19:34 UTC (rev
52882)
+++ brlcad/trunk/src/conv/patch/patch-g.c 2012-10-09 04:20:16 UTC (rev
52883)
@@ -3381,6 +3381,9 @@
int stop, num;
char name[NAMESIZE+1];
+ /* intentionally double for scan */
+ double scan[3];
+
BU_LIST_INIT(&head.l);
BU_LIST_INIT(&heada.l);
BU_LIST_INIT(&headb.l);
@@ -3501,7 +3504,8 @@
* triangle surface normal calculations
*/
sscanf(bu_optarg, "%lf %lf %lf",
- &Centroid[0], &Centroid[1], &Centroid[2]);
+ &scan[0], &scan[1], &scan[2]);
+ VSET(Centroid, scan); /* double to fastf_t */
bu_log("Centroid = (%f %f %f)\n", V3ARGS(Centroid));
VSCALE(Centroid, Centroid, mmtin);
Modified: brlcad/trunk/src/gtools/g_lint.c
===================================================================
--- brlcad/trunk/src/gtools/g_lint.c 2012-10-09 04:19:34 UTC (rev 52882)
+++ brlcad/trunk/src/gtools/g_lint.c 2012-10-09 04:20:16 UTC (rev 52883)
@@ -56,7 +56,7 @@
{
uint32_t glc_magic; /* Magic no. for integrity
check */
long glc_debug; /* Bits to tailor diagnostics */
- fastf_t glc_tol; /* Overlap/void tolerance */
+ double glc_tol; /* Overlap/void tolerance */
unsigned long glc_what_to_report; /* Bits to tailor the output */
unsigned long glc_how_to_report; /* Nature of the output */
FILE *glc_fp; /* The output stream */
@@ -803,9 +803,6 @@
struct application ap;
char db_title[TITLE_LEN+1]; /* Title of database */
char *sp; /* String from strtoul(3) */
- fastf_t azimuth = 0.0;
- fastf_t celsiz = 100.0; /* Spatial sampling rate */
- fastf_t elevation = 0.0;
struct g_lint_ctrl control; /* Info handed to librt(3) */
int cell_center = 0; /* Fire from center of cell? */
int ch; /* Character from getopt */
@@ -828,6 +825,11 @@
vect_t unit_H;
vect_t unit_V;
+ /* intentionally double for scan */
+ double azimuth = 0.0;
+ double celsiz = 100.0; /* Spatial sampling rate */
+ double elevation = 0.0;
+
bu_log("%s\n", rt_version());
control.glc_magic = G_LINT_CTRL_MAGIC;
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