X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FYASim%2FFGGround.cpp;h=7085f5677757d00dc7fd8908e0422491b8d6dafd;hb=d66903e9ad63b91182ccc25d9bb82f18f8dd98b6;hp=e6af48cc455fc2f9590d49fdd91ae3cfe171b809;hpb=d871ca845fecc7cf68b4ad99396122cf3a454609;p=flightgear.git diff --git a/src/FDM/YASim/FGGround.cpp b/src/FDM/YASim/FGGround.cpp index e6af48cc4..7085f5677 100644 --- a/src/FDM/YASim/FGGround.cpp +++ b/src/FDM/YASim/FGGround.cpp @@ -2,6 +2,8 @@ #include #endif +#include + #include #include "Glue.hpp" @@ -23,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];