Hello all,
I am using osgViewer/SimpleViewer with osgGA/TrackballManipulator and
when changing to orthographic projection:
double left,right,bottom,top,zNear,zFar;
simpleViewer->getCamera()->getProjectionMatrixAsFrustum(left,right,bottom,top,zNear,zFar);
simpleViewer->getCamera()->setProjectionMatrixAsOrtho(left,right,bottom,top,zNear,zFar);
I am not able to ZOOM the scene (mouse move with right button).
It's clear that there is something wrong with matrix math. Zoom is done
by osg::Matrixd::translate(0.0,0.0,-_distance) multiplication in
TrackballManipulator::getInverseMatrix(). When changing to
osg::Matrixd::scale(-_distance,-_distance,-_distance) the model is
zoomed, but in other(wrong) way - I cannot zoom "inside the model" and
also lightning is changing by zoom of course.
Do you have any suggestions?
Actually I want to make viewer for CAD model - orthographic projection,
manipulator with simple pan/zoom/rotate and I am wondering that such
manipulator (easier than Trackball or UFO manipulator) is not in OSG.
Many thanks in advance,
Tomas
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/