Remove unused SGMakeRunwaySign function.
This commit is contained in:
@@ -261,9 +261,6 @@ ReaderWriterSTG::readStgFile(const std::string& absoluteFileName,
|
|||||||
} else if ( token == "OBJECT_SIGN" ) {
|
} else if ( token == "OBJECT_SIGN" ) {
|
||||||
node = SGMakeSign(staticOptions->getMaterialLib(), name);
|
node = SGMakeSign(staticOptions->getMaterialLib(), name);
|
||||||
|
|
||||||
} else if ( token == "OBJECT_RUNWAY_SIGN" ) {
|
|
||||||
node = SGMakeRunwaySign(staticOptions->getMaterialLib(), name);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
SG_LOG( SG_TERRAIN, SG_ALERT, absoluteFileName
|
SG_LOG( SG_TERRAIN, SG_ALERT, absoluteFileName
|
||||||
<< ": Unknown token '" << token << "'" );
|
<< ": Unknown token '" << token << "'" );
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
#include "apt_signs.hxx"
|
#include "apt_signs.hxx"
|
||||||
|
|
||||||
#define SIGN "OBJECT_SIGN: "
|
#define SIGN "OBJECT_SIGN: "
|
||||||
#define RWY "OBJECT_RUNWAY_SIGN: "
|
|
||||||
|
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using namespace simgear;
|
using namespace simgear;
|
||||||
@@ -368,26 +367,3 @@ SGMakeSign(SGMaterialLib *matlib, const string& content)
|
|||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node*
|
|
||||||
SGMakeRunwaySign(SGMaterialLib *matlib, const string& name)
|
|
||||||
{
|
|
||||||
// for demo purposes we assume each element (letter) is 1x1 meter.
|
|
||||||
// Sign is placed 0.25 meters above the ground
|
|
||||||
|
|
||||||
float width = name.length() / 3.0;
|
|
||||||
|
|
||||||
osg::Vec3 corner(-width, 0, 0.25f);
|
|
||||||
osg::Vec3 widthVec(2*width + 1, 0, 0);
|
|
||||||
osg::Vec3 heightVec(0, 0, 1);
|
|
||||||
osg::Geometry* geometry;
|
|
||||||
geometry = osg::createTexturedQuadGeometry(corner, widthVec, heightVec);
|
|
||||||
EffectGeode* geode = new EffectGeode;
|
|
||||||
geode->setName(name);
|
|
||||||
geode->addDrawable(geometry);
|
|
||||||
SGMaterial *mat = matlib->find(name);
|
|
||||||
if (mat)
|
|
||||||
geode->setEffect(mat->get_effect());
|
|
||||||
|
|
||||||
return geode;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -45,8 +45,4 @@ using std::string;
|
|||||||
osg::Node* SGMakeSign( SGMaterialLib *matlib, const string& content );
|
osg::Node* SGMakeSign( SGMaterialLib *matlib, const string& content );
|
||||||
|
|
||||||
|
|
||||||
// Generate a runway sign
|
|
||||||
osg::Node* SGMakeRunwaySign( SGMaterialLib *matlib, const string& name );
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _SG_APT_SIGNS_HXX
|
#endif // _SG_APT_SIGNS_HXX
|
||||||
|
|||||||
Reference in New Issue
Block a user