From 24e50def196056a9db356458a037f57e5110f74c Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Thu, 14 Jan 2021 11:33:56 +0000 Subject: [PATCH] WS3.0: Remove duplicate elevation constraints Elevation constraints are now added by the ReaderWriterSTG for all OBJECT entries, so aren't explicitly required for the .icao loader. This also allows us to clean up the BVH generation, as the constraint is added after the model loading is completed and the BVH policy applied. --- src/Airports/AirportBuilder.cxx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Airports/AirportBuilder.cxx b/src/Airports/AirportBuilder.cxx index 810c4b87e..d6cfb63e5 100644 --- a/src/Airports/AirportBuilder.cxx +++ b/src/Airports/AirportBuilder.cxx @@ -145,13 +145,6 @@ osgDB::ReaderWriter::ReadResult AirportBuilder::readNode(const std::string& file matrixTransform->setDataVariance(osg::Object::STATIC); matrixTransform->addChild(group); - // Create a BVH at this point, as we need it to determine how to flatten the terrain mesh. - BoundingVolumeBuildVisitor bvhBuilder(false); - matrixTransform->accept(bvhBuilder); - - // Add the airport to the list of elevation constraints for the scenery - simgear::VPBTechnique::addElevationConstraint(matrixTransform, globals->get_scenery()->get_terrain_branch()); - return matrixTransform; }