]> git.mxchange.org Git - flightgear.git/blobdiff - Tri2obj/tri2obj.cxx
Minor parameter passing tweak.
[flightgear.git] / Tri2obj / tri2obj.cxx
index 20ecb0b2b733236195b0106ab2ce376a37f379aa..a3401052cfd33e156d0455b75c439ea0d322ed0c 100644 (file)
@@ -32,7 +32,6 @@
 #include "tri2obj.hxx"
 
 #include <Include/fg_constants.h>
-#include <Include/fg_types.h>
 #include <Bucket/bucketutils.h>
 
 #include <Math/fg_geodesy.hxx>
@@ -53,8 +52,8 @@ fgBUCKET north_index, south_index, east_index, west_index;
 
 
 // given three points defining a triangle, calculate the normal
-void calc_normal(Point3D p1, Point3D p2, 
-                Point3D p3, double normal[3])
+void calc_normal(const Point3D& p1, const Point3D& p2, 
+                const Point3D& p3, double normal[3])
 {
     double v1[3], v2[3];
     double temp;
@@ -442,7 +441,9 @@ void triload(char *basename, char *basepath) {
        fscanf(node, "%d %lf %lf %lf %d\n", &junk1, 
               &n[0], &n[1], &n[2], &junk2);
        // printf("%d %.2f %.2f %.2f\n", junk1, n[0], n[1], n[2]);
-       p = Point3D(n[0], n[1], n[2]);
+       p = Point3D( n[0] * ARCSEC_TO_RAD,
+                    n[1] * ARCSEC_TO_RAD,
+                    n[2] );
        nodes[i] = fgGeodToCart(p);
        // printf("%d %.2f %.2f %.2f\n", 
        //        junk1, nodes[i].x, nodes[i].y, nodes[i].z);
@@ -622,6 +623,12 @@ int main(int argc, char **argv) {
 
 
 // $Log$
+// Revision 1.5  1998/10/21 14:56:50  curt
+// Minor parameter passing tweak.
+//
+// Revision 1.4  1998/10/20 15:52:46  curt
+// Fixed a units conversion bug introduced when converting to Point3D class.
+//
 // Revision 1.3  1998/10/19 19:33:31  curt
 // C++-ification.
 //