]> 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 c280def1995d8eeabab90c66e8eb8696b17d0889..4b787ddb3ff45c39d57d529f44e18e0c6fd04112 100644 (file)
@@ -262,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);
@@ -272,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);
@@ -291,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;
 }