int nodecount = 0;
-float nodes[MAX_NODES][3];
+double nodes[MAX_NODES][3];
struct fgBUCKET my_index;
while ( fgets(line, 250, fp) != NULL ) {
if ( strncmp(line, "gdn ", 4) == 0 ) {
- sscanf(line, "gdn %f %f %f\n", &nodes[nodecount][0],
+ sscanf(line, "gdn %lf %lf %lf\n", &nodes[nodecount][0],
&nodes[nodecount][1], &nodes[nodecount][2]);
/*
printf("read_nodes(%d) %.2f %.2f %.2f %s", nodecount,
/* $Log$
-/* Revision 1.3 1998/01/27 18:37:00 curt
-/* Lots of updates to get back in sync with changes made over in .../Src/
+/* Revision 1.4 1998/01/31 00:41:23 curt
+/* Made a few changes converting floats to doubles.
/*
+ * Revision 1.3 1998/01/27 18:37:00 curt
+ * Lots of updates to get back in sync with changes made over in .../Src/
+ *
* Revision 1.2 1998/01/15 21:33:36 curt
* Assembling triangles and building a new .node file with the proper shared
* vertices now works. Now we just have to use the shared normals and we'll
/* what do ya' know, here's some global variables */
-float nodes[MAXNODES][3];
-float normals[MAXNODES][3];
+double nodes[MAXNODES][3];
+double normals[MAXNODES][3];
int ccw_list[MAXNODES];
int ccw_list_ptr;
/* save vertex to memory and output to file */
if ( ncount < MAXNODES ) {
/* printf("vertex = %s", line); */
- sscanf(line, "v %f %f %f\n",
+ sscanf(line, "v %lf %lf %lf\n",
&nodes[ncount][0], &nodes[ncount][1], &nodes[ncount][2]);
fprintf(out, "v %.2f %.2f %.2f\n",
nodes[ncount][0], nodes[ncount][1], nodes[ncount][2]);
/* save vertex normals to memory and output to file */
if ( vncount < MAXNODES ) {
/* printf("vertex normal = %s", line); */
- sscanf(line, "vn %f %f %f\n",
+ sscanf(line, "vn %lf %lf %lf\n",
&normals[vncount][0], &normals[vncount][1],
&normals[vncount][2]);
fprintf(out, "vn %.4f %.4f %.4f\n", normals[vncount][0],
/* $Log$
-/* Revision 1.3 1998/01/19 19:51:07 curt
-/* A couple final pre-release tweaks.
+/* Revision 1.4 1998/01/31 00:41:25 curt
+/* Made a few changes converting floats to doubles.
/*
+ * Revision 1.3 1998/01/19 19:51:07 curt
+ * A couple final pre-release tweaks.
+ *
* Revision 1.2 1998/01/09 23:03:12 curt
* Restructured to split 1deg x 1deg dem's into 64 subsections.
*
#define MAXNODES 100000
-extern float nodes[MAXNODES][3];
-extern float normals[MAXNODES][3];
+extern double nodes[MAXNODES][3];
+extern double normals[MAXNODES][3];
extern int stack[MAXNODES];
/* $Log$
-/* Revision 1.2 1998/01/09 23:03:13 curt
-/* Restructured to split 1deg x 1deg dem's into 64 subsections.
+/* Revision 1.3 1998/01/31 00:41:25 curt
+/* Made a few changes converting floats to doubles.
/*
+ * Revision 1.2 1998/01/09 23:03:13 curt
+ * Restructured to split 1deg x 1deg dem's into 64 subsections.
+ *
* Revision 1.1 1997/12/08 19:28:55 curt
* Initial revision.
*
struct fgCartesianPoint p3, double normal[3])
{
double v1[3], v2[3];
- float temp;
+ double temp;
v1[0] = p2.x - p1.x; v1[1] = p2.y - p1.y; v1[2] = p2.z - p1.z;
v2[0] = p3.x - p1.x; v2[1] = p3.y - p1.y; v2[2] = p3.z - p1.z;
/* $Log$
-/* Revision 1.3 1998/01/27 18:37:04 curt
-/* Lots of updates to get back in sync with changes made over in .../Src/
+/* Revision 1.4 1998/01/31 00:41:26 curt
+/* Made a few changes converting floats to doubles.
/*
+ * Revision 1.3 1998/01/27 18:37:04 curt
+ * Lots of updates to get back in sync with changes made over in .../Src/
+ *
* Revision 1.2 1998/01/14 15:54:43 curt
* Initial revision completed.
*
source-tar: clean
(cd ..; \
tar cvzf demtools-$(FG_VERSION).tar.gz Tools/Makefile Tools/README \
- Tools/Todo Tools/make.inc Tools/AssemTris Tools/Dem2node \
- Tools/FixNode Tools/FixObj Tools/SplitTris Tools/Stripe_u \
- Tools/Tri2obj Tools/Triangle)
+ Tools/Todo Tools/make.inc Tools/process-dem.pl Tools/AssemTris \
+ Tools/Dem2node Tools/FixNode Tools/FixObj Tools/SplitTris \
+ Tools/Stripe_u Tools/Tri2obj Tools/Triangle)
source-zip: clean
(cd ..; \
zip -r demtools-$(FG_VERSION).zip Tools/Makefile Tools/README \
- Tools/Todo Tools/make.inc Tools/AssemTris Tools/Dem2node \
- Tools/FixNode Tools/FixObj Tools/SplitTris Tools/Stripe_u \
- Tools/Tri2obj Tools/Triangle)
+ Tools/Todo Tools/make.inc Tools/process-dem.pl Tools/AssemTris \
+ Tools/Dem2node Tools/FixNode Tools/FixObj Tools/SplitTris \
+ Tools/Stripe_u Tools/Tri2obj Tools/Triangle)
bin-tar: all
echo "need to fix this"
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.8 1998/01/31 00:41:19 curt
+# Made a few changes converting floats to doubles.
+#
# Revision 1.7 1998/01/27 18:36:53 curt
# Lots of updates to get back in sync with changes made over in .../Src/
#
1/12/98 - Try reversing cw-wound strips rather than calling glFrontFace()
in the display list.
+ gnuplot> set label "1" at 1,1
+ gnuplot> set label "2" at 2,2
+
+ gnuplot> plot x
+
1/21/98 - Generate an elevation quad tree.
1/12/98 - Generate a face adjacency matrix
int tris[MAX_TRIS][3];
int new_tris[MAX_TRIS][3];
-float normals[MAX_NODES][3];
+double normals[MAX_NODES][3];
struct fgBUCKET my_index;
struct fgBUCKET ne_index, nw_index, sw_index, se_index;
struct fgCartesianPoint p3, double normal[3])
{
double v1[3], v2[3];
- float temp;
+ double temp;
v1[0] = p2.x - p1.x; v1[1] = p2.y - p1.y; v1[2] = p2.z - p1.z;
v2[0] = p3.x - p1.x; v2[1] = p3.y - p1.y; v2[2] = p3.z - p1.z;
MAT3cross_product(normal, v1, v2);
- MAT3_NORMALIZE_VEC(normal,temp);
+ MAT3_NORMALIZE_VEC(normal, temp);
/* printf(" Normal = %.2f %.2f %.2f\n", normal[0], normal[1], normal[2]); */
}
while ( fgets(line, 250, fp) != NULL ) {
if ( strncmp(line, "vn ", 3) == 0 ) {
- sscanf(line, "vn %f %f %f\n", &normals[normalcount][0],
- &normals[normalcount][1], &normals[normalcount][2]);
+ sscanf( line, "vn %lf %lf %lf\n",
+ &normals[normalcount][0],
+ &normals[normalcount][1],
+ &normals[normalcount][2] );
/*
printf("read_normals(%d) %.2f %.2f %.2f %s", normalcount,
normals[normalcount][0], normals[normalcount][1],
/* $Log$
-/* Revision 1.9 1998/01/27 18:37:04 curt
-/* Lots of updates to get back in sync with changes made over in .../Src/
+/* Revision 1.10 1998/01/31 00:41:27 curt
+/* Made a few changes converting floats to doubles.
/*
+ * Revision 1.9 1998/01/27 18:37:04 curt
+ * Lots of updates to get back in sync with changes made over in .../Src/
+ *
* Revision 1.8 1998/01/17 01:25:39 curt
* Added support for shared normals.
*