mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
Store the mag node in the viewer widget
This commit is contained in:
parent
f4bd5a1c71
commit
33874402ea
@ -109,7 +109,7 @@ OsgViewerWidget::OsgViewerWidget(QWidget *parent) : QWidget(parent)
|
||||
|
||||
osg::Group* root = new osg::Group;
|
||||
osg::Node* earth = osgDB::readNodeFile("/Users/jcotton81/Documents/Programming/osgearth/tests/boston.earth");
|
||||
osgEarth::MapNode * mapNode = osgEarth::MapNode::findMapNode( earth );
|
||||
mapNode = osgEarth::MapNode::findMapNode( earth );
|
||||
if (!mapNode)
|
||||
{
|
||||
qDebug() <<"Uhoh";
|
||||
@ -174,6 +174,7 @@ QWidget* OsgViewerWidget::createViewWidget( osg::Camera* camera, osg::Node* scen
|
||||
//manip->setHomeViewpoint(Viewpoint("Boston", osg::Vec3d(-71.0763, 42.34425, 0), 24.261, -21.6, 3450.0));
|
||||
|
||||
manip->setTetherNode(uavPos);
|
||||
|
||||
osgQt::GraphicsWindowQt* gw = dynamic_cast<osgQt::GraphicsWindowQt*>( camera->getGraphicsContext() );
|
||||
return gw ? gw->getGLWidget() : NULL;
|
||||
}
|
||||
|
@ -109,6 +109,7 @@ private: /* Private variables */
|
||||
EarthManipulator* manip;
|
||||
osgEarth::Util::ObjectLocatorNode* uavPos;
|
||||
osg::MatrixTransform* uavAttitudeAndScale;
|
||||
osgEarth::MapNode* mapNode;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user