]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/FGGround.cpp
latest updates from JSBSim
[flightgear.git] / src / FDM / YASim / FGGround.cpp
index 6a82151dfe9d6ab684290a5cd99e5b4710936955..7085f5677757d00dc7fd8908e0422491b8d6dafd 100644 (file)
@@ -1,3 +1,9 @@
+#ifdef HAVE_CONFIG_H
+  #include <config.h>
+#endif
+
+#include <simgear/scene/material/mat.hxx>
+
 #include <FDM/flight.hxx>
 
 #include "Glue.hpp"
@@ -19,11 +25,25 @@ void FGGround::getGroundPlane(const double pos[3],
                               double plane[4], float vel[3])
 {
     // Return values for the callback.
-    double loadCapacity, frictionFactor, agl;
-    double cp[3], dvel[3];
-    int type;
-    _iface->get_agl_m(_toff, pos, cp, plane, dvel,
-                      &type, &loadCapacity, &frictionFactor, &agl);
+    double cp[3], dvel[3], dangvel[3];
+    const SGMaterial* material;
+    simgear::BVHNode::Id id;
+    _iface->get_agl_m(_toff, pos, 2, cp, plane, dvel, dangvel, material, id);
+
+    // The plane below the actual contact point.
+    plane[3] = plane[0]*cp[0] + plane[1]*cp[1] + plane[2]*cp[2];
+
+    for(int i=0; i<3; i++) vel[i] = dvel[i];
+}
+
+void FGGround::getGroundPlane(const double pos[3],
+                              double plane[4], float vel[3],
+                              const SGMaterial **material)
+{
+    // Return values for the callback.
+    double cp[3], dvel[3], dangvel[3];
+    simgear::BVHNode::Id id;
+    _iface->get_agl_m(_toff, pos, 2, cp, plane, dvel, dangvel, *material, id);
 
     // The plane below the actual contact point.
     plane[3] = plane[0]*cp[0] + plane[1]*cp[1] + plane[2]*cp[2];