hi all, i am trying to change Projection matrix from perspective to Orthographic i am not finding proper way to do that.......... i am trying......
void GraphicsScene::makeOrtho() { osg::BoundingSphere bs = mRootNode->getBound(); double h= _gw->getTraits()->height; double w= _gw->getTraits()->width; double aspectratio=w/h; double width = bs.radius()* 1.2; double height = bs.radius()*1.2; i f(width>height) { aspectratio=width/height; getCamera()->setProjectionMatrixAsOrtho(-width*aspectratio,width,-height*aspectratio,height,1.0,10000.0); } else { aspectratio=height/width; getCamera()->setProjectionMatrixAsOrtho(-width*aspectratio,width*aspectratio,-height,height,1.0,10000.0); } } regards , Nitin
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org