X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2Fflight.cxx;h=9826d641743a2b387f9f214d744e3eca07c772d1;hb=076bbb84871952b7dfc791440d710748736389cb;hp=5fd06bad9176f6ff56ac972e81b84eb46a641f37;hpb=7edbf8a8c9d41f03d1b974182d585c1112eb7c45;p=flightgear.git diff --git a/src/FDM/flight.cxx b/src/FDM/flight.cxx index 5fd06bad9..9826d6417 100644 --- a/src/FDM/flight.cxx +++ b/src/FDM/flight.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include
@@ -692,7 +693,7 @@ bool FGInterface::get_agl_m(double t, const double pt[3], double max_altoff, double contact[3], double normal[3], double linearVel[3], double angularVel[3], - SGMaterial const*& material, simgear::BVHNode::Id& id) + simgear::BVHMaterial const*& material, simgear::BVHNode::Id& id) { SGVec3d pt_m = SGVec3d(pt) - max_altoff*ground_cache.get_down(); SGVec3d _contact, _normal, _linearVel, _angularVel; @@ -715,7 +716,7 @@ bool FGInterface::get_agl_ft(double t, const double pt[3], double max_altoff, double contact[3], double normal[3], double linearVel[3], double angularVel[3], - SGMaterial const*& material, simgear::BVHNode::Id& id) + simgear::BVHMaterial const*& material, simgear::BVHNode::Id& id) { // Convert units and do the real work. SGVec3d pt_m = SGVec3d(pt) - max_altoff*ground_cache.get_down(); @@ -741,10 +742,11 @@ bool FGInterface::get_nearest_m(double t, const double pt[3], double maxDist, double contact[3], double normal[3], double linearVel[3], double angularVel[3], - SGMaterial const*& material, + simgear::BVHMaterial const*& material, simgear::BVHNode::Id& id) { SGVec3d _contact, _linearVel, _angularVel; + material = 0; if (!ground_cache.get_nearest(t, SGVec3d(pt), maxDist, _contact, _linearVel, _angularVel, id, material)) return false; @@ -759,10 +761,11 @@ bool FGInterface::get_nearest_ft(double t, const double pt[3], double maxDist, double contact[3], double normal[3], double linearVel[3], double angularVel[3], - SGMaterial const*& material, + simgear::BVHMaterial const*& material, simgear::BVHNode::Id& id) { SGVec3d _contact, _linearVel, _angularVel; + material = 0; if (!ground_cache.get_nearest(t, SG_FEET_TO_METER*SGVec3d(pt), SG_FEET_TO_METER*maxDist, _contact, _linearVel, _angularVel, id, material)) @@ -824,7 +827,7 @@ FGInterface::get_groundlevel_m(const SGGeod& geod) } double contact[3], normal[3], vel[3], angvel[3]; - const SGMaterial* material; + const simgear::BVHMaterial* material; simgear::BVHNode::Id id; // Ignore the return value here, since it just tells us if // the returns stem from the groundcache or from the coarse