open scene graph - handy snippets
quick notes
- osg, openGl use a right handed coordinate system.
- turn off cameras auto compute of near/far when doing orthographic views:
pCam->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
obtaining the viewing frustum
osgViewer::Viewer pViewer = ...; osg::Polytope frustum; frustum.setToUnitFrustum(); frustum.transformProvidingInverse( pViewer->getCameraManipulator->getInverseMatrix() * pViewer->getCamera()->getProjectionMatrix());
ssTk.co.uk
Last updated: 02 February 2012
