SGDirectionalLightListBin vasiLights;
SGDirectionalLightListBin rabitLights;
SGLightListBin odalLights;
+ SGDirectionalLightListBin holdshortLights;
SGDirectionalLightListBin reilLights;
SGMatModelBin randomModels;
SGBuildingBinList randomBuildings;
odalLights.push_back(SGLightBin());
addPointGeometry(odalLights.back(), obj.get_wgs84_nodes(),
color, obj.get_pts_v()[grp]);
+ } else if (materialName == "RWY_YELLOW_PULSE_LIGHTS") {
+ holdshortLights.push_back(SGDirectionalLightBin());
+ addPointGeometry(holdshortLights.back(), obj.get_wgs84_nodes(),
+ obj.get_normals(), color, obj.get_pts_v()[grp],
+ obj.get_pts_n()[grp]);
} else if (materialName == "RWY_REIL_LIGHTS") {
reilLights.push_back(SGDirectionalLightBin());
addPointGeometry(reilLights.back(), obj.get_wgs84_nodes(),
if (tileGeometryBin.runwayLights.getNumLights() > 0
|| !tileGeometryBin.rabitLights.empty()
|| !tileGeometryBin.reilLights.empty()
- || !tileGeometryBin.odalLights.empty()) {
+ || !tileGeometryBin.odalLights.empty()
+ || !tileGeometryBin.holdshortLights.empty()) {
osg::Group* rwyLights = new osg::Group;
rwyLights->setStateSet(lightManager->getRunwayLightStateSet());
rwyLights->setNodeMask(RUNWAYLIGHTS_BIT);
i != tileGeometryBin.reilLights.end(); ++i) {
rwyLights->addChild(SGLightFactory::getSequenced(*i));
}
+ for (i = tileGeometryBin.holdshortLights.begin();
+ i != tileGeometryBin.holdshortLights.end(); ++i) {
+ rwyLights->addChild(SGLightFactory::getHoldShort(*i));
+ }
SGLightListBin::const_iterator j;
for (j = tileGeometryBin.odalLights.begin();
j != tileGeometryBin.odalLights.end(); ++j) {
return sequence;
}
+
+// Blinking hold short line lights
+osg::Node*
+SGLightFactory::getHoldShort(const SGDirectionalLightBin& lights)
+{
+ if (lights.getNumLights() < 2)
+ return 0;
+
+ float flashTime = 2;
+ osg::Sequence* sequence = new osg::Sequence;
+ sequence->setDefaultTime(flashTime);
+ Effect* effect = getLightEffect(6, osg::Vec3(1, 0.001, 0.000002),
+ 0, 6, true);
+ // Lights on
+ EffectGeode* egeode = new EffectGeode;
+ for (int i = lights.getNumLights(); 0 <= i; --i) {
+ egeode->setEffect(effect);
+ egeode->addDrawable(getLightDrawable(lights.getLight(i)));
+ }
+ sequence->addChild(egeode, flashTime);
+
+ // Lights off
+ sequence->addChild(new osg::Group, flashTime);
+
+ sequence->setInterval(osg::Sequence::LOOP, 0, -1);
+ sequence->setDuration(1.0f, -1);
+ sequence->setMode(osg::Sequence::START);
+ sequence->setSync(true);
+
+ return sequence;
+}