+ fixes #0001497: Implement getCameraOrientation similarly to getViewDirection

This commit is contained in:
wmayer
2014-04-02 11:40:36 +02:00
parent f238671b8a
commit 6112c1917b
4 changed files with 45 additions and 7 deletions

View File

@@ -1296,6 +1296,14 @@ SbVec3f View3DInventorViewer::getUpDirection() const
return upvec;
}
SbRotation View3DInventorViewer::getCameraOrientation() const
{
SoCamera* cam = this->getCamera();
if (!cam)
return SbRotation(0,0,0,1); // this is the default
return cam->orientation.getValue();
}
SbVec3f View3DInventorViewer::getPointOnScreen(const SbVec2s& pnt) const
{
const SbViewportRegion& vp = this->getViewportRegion();