]> git.mxchange.org Git - flightgear.git/commitdiff
Made a few changes converting floats to doubles.
authorcurt <curt>
Sat, 31 Jan 1998 00:41:19 +0000 (00:41 +0000)
committercurt <curt>
Sat, 31 Jan 1998 00:41:19 +0000 (00:41 +0000)
AssemTris/assemtris.c
FixObj/obj.c
FixObj/obj.h
SplitTris/splittris.c
Tools/Makefile
Tools/Todo
Tri2obj/tri2obj.c

index 3873fb39c70bec1b45aa7a319e378586b85fe938..e1e1413a1b07ebd20e6b86bb2e5140ba7a68728f 100644 (file)
@@ -41,7 +41,7 @@
 
 int nodecount = 0;
 
-float nodes[MAX_NODES][3];
+double nodes[MAX_NODES][3];
 
 
 struct fgBUCKET my_index;
@@ -315,7 +315,7 @@ void read_nodes(FILE *fp) {
 
     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, 
@@ -454,9 +454,12 @@ int main(int argc, char **argv) {
 
 
 /* $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
index 01d885fdb823ad1e6e9b70a5c62f4b97d15c0fef..fde62bbbc0deaca62764cb94d7298b1ded5fd864 100644 (file)
@@ -33,8 +33,8 @@
 
 
 /* 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;
@@ -175,7 +175,7 @@ void obj_fix(char *infile, char *outfile) {
            /* 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]);
@@ -188,7 +188,7 @@ void obj_fix(char *infile, char *outfile) {
            /* 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], 
@@ -288,9 +288,12 @@ void obj_fix(char *infile, char *outfile) {
 
 
 /* $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.
  *
index 54689de06d985c5034cfe6f608590111930d5c9c..954a088a77f285215bc3c942b4dce38472d345e9 100644 (file)
@@ -30,8 +30,8 @@
 
 #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];
 
 
@@ -43,9 +43,12 @@ void obj_fix(char *infile, char *outfile);
 
 
 /* $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.
  *
index 827e267465b2eee7dc87945d2bc72a584813aba3..3646e22ccc67e31bdfd2e0c604e8720514aea2dd 100644 (file)
@@ -82,7 +82,7 @@ void calc_normal(struct fgCartesianPoint p1, struct fgCartesianPoint p2,
                 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;
@@ -609,9 +609,12 @@ int main(int argc, char **argv) {
 
 
 /* $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.
  *
index dd6f7e4dcae3084878cd13cd228a834f562ce7f0..893088b5b7f74a92b65aa97707a591f2f5b84df5 100644 (file)
@@ -60,16 +60,16 @@ clean:
 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"
@@ -89,6 +89,9 @@ bin-zip:
 
 #---------------------------------------------------------------------------
 # $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/
 #
index 81f0abad5709e2af816426faecbcbc6d1aa408bb..96d0bd539381129364bdee3c9455191017722803 100644 (file)
 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
index ef71af3891be8fce7c230182d90f706ee0e1e009..93fb4f9b67c23db05e406dd80e0be21fcc356ee9 100644 (file)
@@ -46,7 +46,7 @@ struct fgCartesianPoint nodes[MAX_NODES];
 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;
@@ -80,13 +80,13 @@ void calc_normal(struct fgCartesianPoint p1, struct fgCartesianPoint p2,
                 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]); */
 }
@@ -363,8 +363,10 @@ void read_normals(FILE *fp) {
 
     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], 
@@ -638,9 +640,12 @@ int main(int argc, char **argv) {
 
 
 /* $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.
  *