]> git.mxchange.org Git - flightgear.git/commitdiff
Modified Files:
authorfrohlich <frohlich>
Wed, 27 Dec 2006 10:47:10 +0000 (10:47 +0000)
committerfrohlich <frohlich>
Wed, 27 Dec 2006 10:47:10 +0000 (10:47 +0000)
src/FDM/flight.cxx src/FDM/flight.hxx src/FDM/groundcache.cxx:
Maik Justus: Provide the material we roll on in the groundcache.

src/FDM/flight.cxx
src/FDM/flight.hxx
src/FDM/groundcache.cxx

index 08aa8fae79bcf8a882ecaaf17dffcae807979e0a..55d8545a5aafb46fa49daa6e4844fde131db2665 100644 (file)
@@ -883,6 +883,20 @@ FGInterface::get_agl_m(double t, const double pt[3],
   return ret;
 }
 
+bool
+FGInterface::get_agl_m(double t, const double pt[3],
+                       double contact[3], double normal[3], double vel[3],
+                       int *type, const SGMaterial **material, double *agl)
+{
+  SGVec3d _contact, _normal, _vel;
+  bool ret = ground_cache.get_agl(t, SGVec3d(pt), 2.0, _contact, _normal,
+                                  _vel, type, material, agl);
+  sgdCopyVec3(contact, _contact.data());
+  sgdCopyVec3(normal, _normal.data());
+  sgdCopyVec3(vel, _vel.data());
+  return ret;
+}
+
 // Legacy interface just kept because of JSBSim
 bool
 FGInterface::get_agl_ft(double t, const double pt[3],
index 09d40bd323532761e2f9c61e6aa7f502af30b084..f5533625c090772cc5012ff3b55c1247acf617b9 100644 (file)
@@ -1128,6 +1128,9 @@ public:
                    double contact[3], double normal[3], double vel[3],
                    int *type, double *loadCapacity,
                    double *frictionFactor, double *agl);
+    bool get_agl_m(double t, const double pt[3],
+                       double contact[3], double normal[3], double vel[3],
+                       int *type, const SGMaterial **material,double *agl);
     bool get_agl_ft(double t, const double pt[3],
                     double contact[3], double normal[3], double vel[3],
                     int *type, double *loadCapacity,
index 3f1a396a0449078a037b898df8c985355ad253f5..3ffc28331cf227b6654f35c68c4eaec1e999506b 100644 (file)
@@ -527,6 +527,7 @@ public:
         t.rotation = mGroundProperty.rot;
         t.rotation_pivot = mGroundProperty.pivot - mGroundCache->cache_center;
         t.type = mGroundProperty.type;
+        t.material=mGroundProperty.material;
         mGroundCache->triangles.push_back(t);
       }
     }