]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/tilemgr.cxx
One more pass at a reorg.
[flightgear.git] / src / Scenery / tilemgr.cxx
index d0f7088c6758196cb555420ef73268822431d09a..f151c7d0f242ccf2ea2c5a39607d1342d51f50b9 100644 (file)
 #endif
 
 #include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl/xgl.h>
 
-#include <Aircraft/aircraft.hxx>
+#include <simgear/constants.h>
+#include <simgear/debug/logstream.hxx>
+#include <simgear/math/fg_geodesy.hxx>
+#include <simgear/math/mat3.h>
+#include <simgear/math/point3d.hxx>
+#include <simgear/math/polar3d.hxx>
+#include <simgear/math/vector.hxx>
 
-#include <Debug/logstream.hxx>
-// #include <Bucket/bucketutils.hxx>
-#include <Include/fg_constants.h>
+#include <Aircraft/aircraft.hxx>
 #include <Main/options.hxx>
 #include <Main/views.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Math/mat3.h>
-#include <Math/point3d.hxx>
-#include <Math/polar3d.hxx>
-#include <Math/vector.hxx>
 #include <Objects/materialmgr.hxx>
 #include <Objects/obj.hxx>
 
@@ -391,22 +390,6 @@ inline double fg_max3 (const double a, const double b, const double c ) {
     return a < b ? fg_max(b, c) : fg_max(a, c);
 }
 
-inline void sgdSetVec3 ( sgdVec3 dst, sgVec3 src )
-{
-  dst [ 0 ] = src [ 0 ] ;
-  dst [ 1 ] = src [ 1 ] ;
-  dst [ 2 ] = src [ 2 ] ;
-}
-
-inline void sgdSetMat4 ( sgdMat4 dst, sgMat4 src )
-{
-  for ( int i = 0; i < 4; ++i ) {
-      for ( int j = 0; j < 4; ++j ) {
-         dst [ i ] [ j ] = src [ i ] [ j ];
-      }
-  }
-}
-
 // check for an instersection with the individual triangles of a leaf
 static bool my_ssg_instersect_leaf( string s, ssgLeaf *leaf, sgdMat4 m,
                                    const sgdVec3 p, const sgdVec3 dir,
@@ -695,7 +678,9 @@ void FGTileMgr::my_ssg_los( string s, ssgBranch *branch, sgdMat4 m,
                    {
                        // cout << "sgLOS hit: " << result[0] << "," 
                        //      << result[1] << "," << result[2] << endl;
-                       hit_pts[hitcount] = result;
+                       for (int i=0; i < 3; i++) {
+                           hit_pts[hitcount][i] = result[i];
+                       }
                        hitcount++;
                    }
                }