WS3.0 Add OBJECT STG entries as elevation constraints
Note this is for OBJECT only (e.g. airports), not OBJECT_STATIC or OBJECT_SHARED
This commit is contained in:
@@ -53,6 +53,8 @@
|
|||||||
#include <simgear/scene/material/matlib.hxx>
|
#include <simgear/scene/material/matlib.hxx>
|
||||||
#include <simgear/scene/tgdb/SGBuildingBin.hxx>
|
#include <simgear/scene/tgdb/SGBuildingBin.hxx>
|
||||||
#include <simgear/scene/tgdb/TreeBin.hxx>
|
#include <simgear/scene/tgdb/TreeBin.hxx>
|
||||||
|
#include <simgear/scene/tgdb/VPBTechnique.hxx>
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/scene/util/SGSceneFeatures.hxx>
|
#include <simgear/scene/util/SGSceneFeatures.hxx>
|
||||||
|
|
||||||
@@ -673,6 +675,11 @@ struct ReaderWriterSTG::_ModelBin {
|
|||||||
<< stgObject._token << " '" << stgObject._name << "'");
|
<< stgObject._token << " '" << stgObject._name << "'");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add the OBJECT to the elevation constraints of the terrain so the terrain
|
||||||
|
// doesn't poke through the airport
|
||||||
|
simgear::VPBTechnique::addElevationConstraint(node, terrainGroup);
|
||||||
|
|
||||||
terrainGroup->addChild(node.get());
|
terrainGroup->addChild(node.get());
|
||||||
}
|
}
|
||||||
} else if (_foundBase) {
|
} else if (_foundBase) {
|
||||||
|
|||||||
Reference in New Issue
Block a user