#include <osgViewer/Viewer>
#include <simgear/constants.h>
+#include <simgear/sg_inlines.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/scene/tgdb/userdata.hxx>
#include <simgear/scene/material/matlib.hxx>
+#include <simgear/scene/material/mat.hxx>
#include <simgear/scene/util/SGNodeMasks.hxx>
#include <simgear/scene/util/OsgMath.hxx>
#include <simgear/scene/util/SGSceneUserData.hxx>
}
-void FGScenery::update(double dt) {
+void FGScenery::update(double dt)
+{
+ SG_UNUSED(dt);
+ // nothing here, don't call again
+ suspend();
}
bool
FGScenery::get_cart_elevation_m(const SGVec3d& pos, double max_altoff,
- double& alt, const SGMaterial** material,
+ double& alt,
+ const simgear::BVHMaterial** material,
const osg::Node* butNotFrom)
{
SGGeod geod = SGGeod::fromCart(pos);
bool
FGScenery::get_elevation_m(const SGGeod& geod, double& alt,
- const SGMaterial** material,
+ const simgear::BVHMaterial** material,
const osg::Node* butNotFrom)
{
SGVec3d start = SGVec3d::fromGeod(geod);
geodEnd = SGGeod::fromCart(intersectVisitor.getLineSegment().getEnd());
alt = geodEnd.getElevationM();
if (material)
- *material = dynamic_cast<const SGMaterial*>(intersectVisitor.getMaterial());
+ *material = intersectVisitor.getMaterial();
return true;
}