I had to do it this way: viewer.getCullSettings().setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR);
Brian -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Tugkan Calapoglu <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 02/20/2007 10:16 AM Please respond to osg users <[email protected]> To osg users <[email protected]> cc Subject Re: [osg-users] disabling automatic near far computation Robert Osfield wrote: > Hi Tugkan, > > You shoudl be able to disable the near far compute by doing: > > viewer.getCamera()->setComputeNearFarMode(osg::CullSettingts::DO_NOT_COMPUTE_NEAR_FAR) > > I've tried it. It doesn't work. Just to be sure I've tried it inside osgviewer.cpp as follows . . . viewer.setSceneData( loadedModel.get() ); viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); printf("nf mode:%i\n" , viewer.getCamera()->getComputeNearFarMode()); return viewer.run(); . . . It didn't work here also. printf prints 0 which is CullSettings::DO_NOT_COMPUTE_NEAR_FAR. > As osg::Camera inherits from CullSettings. > > Robert. > > On 2/20/07, Tugkan Calapoglu <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I have a viewer class which is derived from osgViewer::Viewer. I am >> trying to disable automatic near-far calculation for this class and it >> works only if I override the frame() method and call >> setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR) >> every frame for all scene views. >> >> Is it supposed to be so? I've tried calling the above method in the >> c'tor for scene viewers and cameras but it did not work. >> >> Note: I am using latest SVN version (an hour or so old) on Suse9.3 >> >> Tugkan >> >> ------------------------------------- >> VIRES Simulationstechnologie GmbH >> Oberaustrasse 34 >> 83026 Rosenheim >> Germany >> phone +49.8031.463640 >> fax +49.8031.463645 >> email [EMAIL PROTECTED] >> internet www.vires.com >> ------------------------------------- >> Sitz der Gesellschaft: Rosenheim >> Handelsregister Traunstein HRB 10410 >> Geschaeftsfuehrer: Marius Dupuis >> Wunibald Karl >> ------------------------------------- >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://openscenegraph.net/mailman/listinfo/osg-users >> http://www.openscenegraph.org/ >> > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > -- Tugkan Calapoglu ------------------------------------- VIRES Simulationstechnologie GmbH Oberaustrasse 34 83026 Rosenheim Germany phone +49.8031.463640 fax +49.8031.463645 email [EMAIL PROTECTED] internet www.vires.com ------------------------------------- Sitz der Gesellschaft: Rosenheim Handelsregister Traunstein HRB 10410 Geschaeftsfuehrer: Marius Dupuis Wunibald Karl ------------------------------------- _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
