1
0
Fork 0

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.
This commit is contained in:
Stuart Buchanan 2021-01-14 11:33:56 +00:00
parent cb90785810
commit 24e50def19

View file

@ -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;
}