+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <simgear/scene/material/mat.hxx>
+
#include <FDM/flight.hxx>
#include "Glue.hpp"
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];