X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FScenery%2Fscenery.cxx;h=5ed687e83c3175e9f0acfd70a39931c4b11b6b80;hb=3d4806adbe6705f785fd950bd4b4afde1cb4f8d2;hp=908f4da22870e9bc226cd02f1364fa950637198d;hpb=d683d39e8552be5fadedd996c648dd7e16af17ee;p=flightgear.git diff --git a/src/Scenery/scenery.cxx b/src/Scenery/scenery.cxx index 908f4da22..5ed687e83 100644 --- a/src/Scenery/scenery.cxx +++ b/src/Scenery/scenery.cxx @@ -36,16 +36,19 @@ #include #include +#include #include #include #include +#include #include +#include #include #include -#include -#include +#include +#include -#include
+#include #include
#include "tilemgr.hxx" @@ -91,7 +94,7 @@ public: { return _haveHit; } const SGLineSegmentd& getLineSegment() const { return _lineSegment; } - const SGMaterial* getMaterial() const + const simgear::BVHMaterial* getMaterial() const { return _material; } virtual void apply(osg::Node& node) @@ -151,7 +154,7 @@ private: SGLineSegmentd lineSegment = _lineSegment; bool haveHit = _haveHit; - const SGMaterial* material = _material; + const simgear::BVHMaterial* material = _material; _haveHit = false; _lineSegment = lineSegment.transform(SGMatrixd(inverseMatrix.ptr())); @@ -204,7 +207,7 @@ private: SGLineSegmentd _lineSegment; const osg::Node* _skipNode; - const SGMaterial* _material; + const simgear::BVHMaterial* _material; bool _haveHit; }; @@ -247,7 +250,11 @@ void FGScenery::init() { } -void FGScenery::update(double dt) { +void FGScenery::update(double dt) +{ + SG_UNUSED(dt); + // nothing here, don't call again + suspend(); } @@ -260,7 +267,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); @@ -270,7 +278,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);