]> git.mxchange.org Git - flightgear.git/commitdiff
Converting to polar3d.h routines.
authorcurt <curt>
Sat, 2 May 1998 01:54:24 +0000 (01:54 +0000)
committercurt <curt>
Sat, 2 May 1998 01:54:24 +0000 (01:54 +0000)
AssemTris/Makefile.in
DemRaw2ascii/Makefile.in
FixNode/Makefile.in
FixObj/Makefile.in
SplitTris/Makefile.in
SplitTris/splittris.c
Tri2obj/Makefile.in
Tri2obj/tri2obj.c

index e7bddf4dd6c1b622bfd4918dd6c6abb86c8979ca..a66482ce820107a36bd2bf933841f508a4cc7209 100644 (file)
@@ -344,8 +344,8 @@ INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib
 
 #---------------------------------------------------------------------------
 # $Log$
-# Revision 1.8  1998/04/28 01:24:01  curt
-# Updates ...
+# Revision 1.9  1998/05/02 01:54:24  curt
+# Converting to polar3d.h routines.
 #
 # Revision 1.2  1998/04/14 02:25:59  curt
 # Code reorganizations.  Added a Lib/ directory for more general libraries.
index b0f93ab8bc16a9049eb07565fd83f380a77177eb..c8a21b660b5246683f419c64b7236be1e15c135c 100644 (file)
@@ -343,8 +343,8 @@ INCLUDES +=
 
 #---------------------------------------------------------------------------
 # $Log$
-# Revision 1.6  1998/04/28 01:24:08  curt
-# Updates ...
+# Revision 1.7  1998/05/02 01:54:34  curt
+# Converting to polar3d.h routines.
 #
 # Revision 1.2  1998/04/24 00:44:04  curt
 # Added zlib support.
index e36cfe0d8e290d705e327b8ca21958ad1933993a..9b90de5e2e3c5618ec6beb65feb164dfeb4da58e 100644 (file)
@@ -371,8 +371,8 @@ INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib
 
 #---------------------------------------------------------------------------
 # $Log$
-# Revision 1.8  1998/04/28 01:24:10  curt
-# Updates ...
+# Revision 1.9  1998/05/02 01:54:35  curt
+# Converting to polar3d.h routines.
 #
 # Revision 1.3  1998/04/18 04:02:54  curt
 # Added zlib support in placed and other misc. tweaks.
index a1b855567dce9c21956feee366042dd1b589abf7..e86c771d53cfca7efc0125383eefb93cc36a7e29 100644 (file)
@@ -347,8 +347,8 @@ INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib
 
 #---------------------------------------------------------------------------
 # $Log$
-# Revision 1.8  1998/04/28 01:24:12  curt
-# Updates ...
+# Revision 1.9  1998/05/02 01:54:36  curt
+# Converting to polar3d.h routines.
 #
 # Revision 1.4  1998/04/24 00:44:05  curt
 # Added zlib support.
index da4c6b09c6eef4f4459042dc8481511c608295e6..fdd82b9da06c66095ef970327267c5366d23e167 100644 (file)
@@ -349,8 +349,8 @@ INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib
 
 #---------------------------------------------------------------------------
 # $Log$
-# Revision 1.8  1998/04/28 01:24:14  curt
-# Updates ...
+# Revision 1.9  1998/05/02 01:54:36  curt
+# Converting to polar3d.h routines.
 #
 # Revision 1.4  1998/04/24 00:44:06  curt
 # Added zlib support.
index c855c75250d5ebabc6e40769306f2febe99ea16f..c40000794b66c8f01d34ede279aef92b981a066c 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <Math/fg_geodesy.h>
 #include <Math/mat3.h>
-#include <Math/polar.h>
+#include <Math/polar3d.h>
 
 int nodecount, tricount;
 double xmin, xmax, ymin, ymax;
@@ -49,15 +49,16 @@ static double nodes_orig[MAX_NODES][3];
 static int tris[MAX_TRIS][3];
 /* static int new_tris[MAX_TRIS][3]; */
 
-static struct fgCartesianPoint nodes_cart[MAX_NODES];
+static fgCartesianPoint3d nodes_cart[MAX_NODES];
 
 struct fgBUCKET ne_index, nw_index, sw_index, se_index;
 struct fgBUCKET north_index, south_index, east_index, west_index;
 
 /* convert a geodetic point lon(arcsec), lat(arcsec), elev(meter) to
  * a cartesian point */
-struct fgCartesianPoint geod_to_cart(double geod[3]) {
-    struct fgCartesianPoint p;
+fgCartesianPoint3d geod_to_cart(double geod[3]) {
+    fgCartesianPoint3d cp;
+    fgPolarPoint3d pp;
     double gc_lon, gc_lat, sl_radius;
 
     /* printf("A geodetic point is (%.2f, %.2f, %.2f)\n", 
@@ -69,17 +70,20 @@ struct fgCartesianPoint geod_to_cart(double geod[3]) {
     /* printf("A geocentric point is (%.2f, %.2f, %.2f)\n", gc_lon, 
           gc_lat, sl_radius+geod[2]); */
 
-    p = fgPolarToCart(gc_lon, gc_lat, sl_radius+geod[2]);
+    pp.lon = gc_lon;
+    pp.lat = gc_lat;
+    pp.radius = sl_radius+geod[2];
+    cp = fgPolarToCart3d(pp);
     
-    /* printf("A cart point is (%.8f, %.8f, %.8f)\n", p.x, p.y, p.z); */
+    /* printf("A cart point is (%.8f, %.8f, %.8f)\n", cp.x, cp.y, cp.z); */
 
-    return(p);
+    return(cp);
 }
 
 
 /* given three points defining a triangle, calculate the normal */
-void calc_normal(struct fgCartesianPoint p1, struct fgCartesianPoint p2, 
-                struct fgCartesianPoint p3, double normal[3])
+void calc_normal(fgCartesianPoint3d p1, fgCartesianPoint3d p2, 
+                fgCartesianPoint3d p3, double normal[3])
 {
     double v1[3], v2[3];
     double temp;
@@ -612,9 +616,12 @@ int main(int argc, char **argv) {
 
 
 /* $Log$
-/* Revision 1.9  1998/04/18 04:01:20  curt
-/* Now use libMath rather than having local copies of math routines.
+/* Revision 1.10  1998/05/02 01:54:37  curt
+/* Converting to polar3d.h routines.
 /*
+ * Revision 1.9  1998/04/18 04:01:20  curt
+ * Now use libMath rather than having local copies of math routines.
+ *
  * Revision 1.8  1998/04/14 02:26:08  curt
  * Code reorganizations.  Added a Lib/ directory for more general libraries.
  *
index a11019a07f435192d2e52ba338b2f19ab183cd53..221a2f24730fc7f8ae665a987fcdd3749a808252 100644 (file)
@@ -349,8 +349,8 @@ INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib
 
 #---------------------------------------------------------------------------
 # $Log$
-# Revision 1.8  1998/04/28 01:24:16  curt
-# Updates ...
+# Revision 1.9  1998/05/02 01:54:38  curt
+# Converting to polar3d.h routines.
 #
 # Revision 1.4  1998/04/24 00:44:07  curt
 # Added zlib support.
index 4b12310de98b311cad46faecd695dd60050c53df..5c6390afe96fa228a678edfcd4612e1322864cf5 100644 (file)
 
 #include <Math/fg_geodesy.h>
 #include <Math/mat3.h>
-#include <Math/polar.h>
+#include <Math/polar3d.h>
 
 
 int nodecount, tricount;
 int normalcount = 0;
-static struct fgCartesianPoint nodes[MAX_NODES];
+static fgCartesianPoint3d nodes[MAX_NODES];
 static int tris[MAX_TRIS][3];
 
 static double normals[MAX_NODES][3];
@@ -54,8 +54,9 @@ struct fgBUCKET north_index, south_index, east_index, west_index;
 
 /* convert a geodetic point lon(arcsec), lat(arcsec), elev(meter) to
  * a cartesian point */
-struct fgCartesianPoint geod_to_cart(double geod[3]) {
-    struct fgCartesianPoint p;
+fgCartesianPoint3d geod_to_cart(double geod[3]) {
+    fgCartesianPoint3d cp;
+    fgPolarPoint3d pp;
     double gc_lon, gc_lat, sl_radius;
 
     /* printf("A geodetic point is (%.2f, %.2f, %.2f)\n", 
@@ -67,17 +68,20 @@ struct fgCartesianPoint geod_to_cart(double geod[3]) {
     /* printf("A geocentric point is (%.2f, %.2f, %.2f)\n", gc_lon, 
           gc_lat, sl_radius+geod[2]); */
 
-    p = fgPolarToCart(gc_lon, gc_lat, sl_radius+geod[2]);
+    pp.lon = gc_lon;
+    pp.lat = gc_lat;
+    pp.radius = sl_radius+geod[2];
+    cp = fgPolarToCart3d(pp);
     
-    /* printf("A cart point is (%.8f, %.8f, %.8f)\n", p.x, p.y, p.z); */
+    /* printf("A cart point is (%.8f, %.8f, %.8f)\n", cp.x, cp.y, cp.z); */
 
-    return(p);
+    return(cp);
 }
 
 
 /* given three points defining a triangle, calculate the normal */
-void calc_normal(struct fgCartesianPoint p1, struct fgCartesianPoint p2, 
-                struct fgCartesianPoint p3, double normal[3])
+void calc_normal(fgCartesianPoint3d p1, fgCartesianPoint3d p2, 
+                fgCartesianPoint3d p3, double normal[3])
 {
     double v1[3], v2[3];
     double temp;
@@ -640,9 +644,12 @@ int main(int argc, char **argv) {
 
 
 /* $Log$
-/* Revision 1.14  1998/04/18 04:01:32  curt
-/* Now use libMath rather than having local copies of math routines.
+/* Revision 1.15  1998/05/02 01:54:39  curt
+/* Converting to polar3d.h routines.
 /*
+ * Revision 1.14  1998/04/18 04:01:32  curt
+ * Now use libMath rather than having local copies of math routines.
+ *
  * Revision 1.13  1998/04/14 02:26:11  curt
  * Code reorganizations.  Added a Lib/ directory for more general libraries.
  *