Thank you for your reply Markus! So i tried what you told me but with 
setLensFrustrum that makes me something weird... My scene is tiny in the middle 
of my screen and when i rotate the scene it is even more weird.
I tried with this: 
viewer.getCamera(0)->setLensFrustrum(-0.1,0.1,-0.1,0.1,0.001,1e7) (i do not 
know what is xhear and y shear). I put "0.1" because with "1000" my scene is 
just a little point in the middle of my screen.
Then i tried with the other function: setLensPerspective(45,45,0.001,1e7) (i do 
not really know what is the difference between hfov and vfov). This time my 
scene is not a tiny point but it is normal, but the parameters do not seem to 
work...
As a matter of fact, my first problem with the frustrum is that the near plane 
processes the culling too far away from the point of view: i would like the 
objects to come close toward the screen. And finally, i would like the far 
plane quite far away because i need to display some objects (stars that are far 
away) on the far plane.
I hope you will be able to help me more or someone else who would know the 
answer. Thanks a lot!

Bye


> Hi...
>
> you could do something like this:
>
>  osgProducer::Viewer viewer(BuildConfig());
>  viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);
>  viewer.getCamera(0)->setLensFrustum
> (left,right,bottom,top,nearClip,farClip,xshear,yshear);
>
> or...if you just need to set a symetrical frustum you could use this one
>
>  viewer.getCamera(0)->setLensPerspective(hfov, vfov, near, far,
> xshear,yshear);
>
> Hope this helps...
> bye, Markus.
>
>
> Am 20.04.2007 um 14:24 schrieb belthil:

Créez votre adresse électronique [EMAIL PROTECTED]
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to