]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/groundcache.hxx
- Added ultra-light traffic is now a separate traffic class that can have its
[flightgear.git] / src / FDM / groundcache.hxx
index 754d539215154eba647a8aa2c8571ac20427dcf9..48c46d938a949caaf6803a3684f353502b70f6c9 100644 (file)
@@ -26,6 +26,7 @@
 #include <simgear/compiler.h>
 #include <simgear/constants.h>
 #include <simgear/math/SGMath.hxx>
+#include <simgear/math/SGGeometry.hxx>
 
 class SGMaterial;
 class GroundCacheFillVisitor;
@@ -85,13 +86,9 @@ private:
 
     struct Triangle {
       Triangle() : material(0) {}
-      // The edge vertices.
-      SGVec3d vertices[3];
-      // The surface normal.
-      SGVec4d plane;
-      // The bounding shpere.
-      SGVec3d boundCenter;
-      double boundRadius;
+      // The triangle we represent
+      SGTriangled triangle;
+      SGSphered sphere;
       // The linear and angular velocity.
       SGVec3d velocity;
       SGVec3d rotation;
@@ -117,11 +114,13 @@ private:
     };
 
 
-    // The center of the cache.
-    SGVec3d cache_center;
     // Approximate ground radius.
     // In case the aircraft is too high above ground.
     double ground_radius;
+    // Ground type
+    int _type;
+    // the simgear material reference, contains friction coeficients ...
+    const SGMaterial* _material;
     // The time reference for later call to intersection test routines.
     // Is required since we will have moving triangles in carriers.
     double cache_ref_time;
@@ -152,8 +151,8 @@ private:
       const SGMaterial* material;
     };
 
-    static void velocityTransformTriangle(double dt, Triangle& dst,
-                                          const Triangle& src);
+    static void velocityTransformTriangle(double dt, SGTriangled& dst,
+                                          SGSphered& sdst, const Triangle& src);
 };
 
 #endif