OpenCS: Fix camera position retrieval in WorldspaceWidget

This commit is contained in:
scrawl 2015-09-23 23:37:09 +02:00
parent 7bef97bf33
commit 12b8fcf0bf
2 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -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;