OpenCS: Fix camera position retrieval in WorldspaceWidget

sceneinput
scrawl 9 years ago
parent 7bef97bf33
commit 12b8fcf0bf

@ -170,7 +170,10 @@ void CSVRender::PagedWorldspaceWidget::referenceAdded (const QModelIndex& parent
std::string CSVRender::PagedWorldspaceWidget::getStartupInstruction()
{
osg::Vec3d position = mView->getCamera()->getViewMatrix().getTrans();
osg::Vec3d eye, center, up;
mView->getCamera()->getViewMatrixAsLookAt(eye, center, up);
osg::Vec3d position = eye;
std::ostringstream stream;
stream

@ -166,7 +166,9 @@ void CSVRender::UnpagedWorldspaceWidget::addVisibilitySelectorButtons (
std::string CSVRender::UnpagedWorldspaceWidget::getStartupInstruction()
{
osg::Vec3d position = mView->getCamera()->getViewMatrix().getTrans();
osg::Vec3d eye, center, up;
mView->getCamera()->getViewMatrixAsLookAt(eye, center, up);
osg::Vec3d position = eye;
std::ostringstream stream;

Loading…
Cancel
Save