1
0
Fork 0

Feature request for Syd - expose the ND view heading

This commit is contained in:
James Turner 2012-04-23 13:59:01 +01:00
parent 73d2d3425f
commit 1011251504
2 changed files with 4 additions and 1 deletions

View file

@ -540,6 +540,7 @@ NavDisplay::init ()
_testModeNode = _Instrument->getChild("test-mode", 0, true); _testModeNode = _Instrument->getChild("test-mode", 0, true);
_testModeNode->setBoolValue(false); _testModeNode->setBoolValue(false);
_viewHeadingNode = _Instrument->getChild("view-heading-deg", 0, true);
// OSG geometry setup // OSG geometry setup
_radarGeode = new osg::Geode; _radarGeode = new osg::Geode;
@ -647,6 +648,7 @@ NavDisplay::update (double delta_time_sec)
} else { } else {
_view_heading = _Instrument->getFloatValue("heading-up-deg", 0.0); _view_heading = _Instrument->getFloatValue("heading-up-deg", 0.0);
} }
_viewHeadingNode->setDoubleValue(_view_heading);
double xCenterFrac = _xCenterNode->getDoubleValue(); double xCenterFrac = _xCenterNode->getDoubleValue();
double yCenterFrac = _yCenterNode->getDoubleValue(); double yCenterFrac = _yCenterNode->getDoubleValue();

View file

@ -146,7 +146,8 @@ private:
SGPropertyNode_ptr _navRadio1Node; SGPropertyNode_ptr _navRadio1Node;
SGPropertyNode_ptr _navRadio2Node; SGPropertyNode_ptr _navRadio2Node;
SGPropertyNode_ptr _xCenterNode, _yCenterNode; SGPropertyNode_ptr _xCenterNode, _yCenterNode;
SGPropertyNode_ptr _viewHeadingNode;
osg::ref_ptr<osg::Texture2D> _symbolTexture; osg::ref_ptr<osg::Texture2D> _symbolTexture;
osg::ref_ptr<osg::Geode> _radarGeode; osg::ref_ptr<osg::Geode> _radarGeode;
osg::ref_ptr<osg::Geode> _textGeode; osg::ref_ptr<osg::Geode> _textGeode;