]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/scenery.cxx
Revert "Fix compilation problem with MSVC 2012"
[flightgear.git] / src / Scenery / scenery.cxx
index 9c6ef27960f38f48a93710bfc7851881dabdeb66..4b787ddb3ff45c39d57d529f44e18e0c6fd04112 100644 (file)
@@ -39,6 +39,7 @@
 #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>
@@ -261,7 +262,8 @@ void FGScenery::unbind() {
 
 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);
@@ -271,7 +273,7 @@ FGScenery::get_cart_elevation_m(const SGVec3d& pos, double max_altoff,
 
 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);
@@ -290,7 +292,7 @@ FGScenery::get_elevation_m(const SGGeod& geod, double& alt,
   geodEnd = SGGeod::fromCart(intersectVisitor.getLineSegment().getEnd());
   alt = geodEnd.getElevationM();
   if (material)
-      *material = dynamic_cast<const SGMaterial*>(intersectVisitor.getMaterial());
+      *material = intersectVisitor.getMaterial();
 
   return true;
 }