fyi, try exploring
osgthirdpersonview cessnafire.osg
for a vibrant visualization of OSG's automatic near/far computation.
-- mew
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Thrall, Bryan
> Sent: Wednesday, April 30, 2008 8:49 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] how to se the near and far clip
> plane??(setProjectionMatrixAsPerspective not working)
>
> David _ wrote on Wednesday, April 30, 2008 7:56 AM:
> > Hi
> >
> > i would like to manually specify the near and far clip planes of the
> > camera
> >
> > right now i´m using something like this
> >
> > osg_viewer->getCamera()->setProjectionMatrixAsPerspective(90.0,
> > 1.333, 0.001, 100);
> >
> > the documentation says this
> >
> > void setProjectionMatrixAsPerspective
> >
> <http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDoc
> s/a01059.html#a35>
> > (double fovy, double aspectRatio, double zNear, double zFar)
> >
> > the FOV and aspect ratio parameters are working, but no matter the
> > values i write in the last two parameters, the clip planes distance
> > remains the same
> >
> > any idea?
>
> Try:
>
> osg_viewer->getCamera()-
> >setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
>
> Then setProjectionMatrixAsPerspective should work. (By default, OSG
> automatically computes the near and far planes based on the scenegraph
> geometry)
>
> --
> Bryan Thrall
> FlightSafety International
> [EMAIL PROTECTED]
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org