#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/math/SGMisc.hxx>
+#include <simgear/scene/material/mat.hxx>
#include <simgear/scene/util/SGNodeMasks.hxx>
#include <simgear/scene/util/SGSceneUserData.hxx>
#include <simgear/scene/util/OsgMath.hxx>
if (!found_ground) {
// Ok, still nothing here?? Last resort ...
double alt = 0;
- const SGMaterial* m = NULL;
+ _material = 0;
found_ground = globals->get_scenery()->
- get_elevation_m(SGGeod::fromGeodM(geodPt, 10000), alt, &m);
- _material = m;
+ get_elevation_m(SGGeod::fromGeodM(geodPt, 10000), alt, &_material);
if (found_ground)
_altitude = alt;
}
_localBvhTree->accept(wireIntersector);
_wire = wireIntersector.getWire();
- return _wire;
+ return (_wire != NULL);
}
class FGGroundCache::WireFinder : public BVHVisitor {