[osg-users] Frustum specialists look here.

Johan Johnsson johanj at autosim.no
Thu Oct 18 00:44:36 PDT 2007


         double left   = ((ch.frustum.left)   * ch.frustum.nearClipping /  
abs( ch.frustum.distance));
         double right  = ((ch.frustum.right)  * ch.frustum.nearClipping /  
abs( ch.frustum.distance));
         double top    = ((ch.frustum.top)    * ch.frustum.nearClipping /  
abs( ch.frustum.distance));
         double bottom = ((ch.frustum.bottom) * ch.frustum.nearClipping /  
abs( ch.frustum.distance));

         camera->setGraphicsContext(gc.get());
         camera->setProjectionMatrixAsFrustum(left, right, bottom, top,  
ch.frustum.nearClipping, 	  		ch.frustum.farClipping);

// offset comes further down.



On Thu, 18 Oct 2007 09:39:53 +0200, Adrian Egli <3dhelp at gmail.com> wrote:

> Hi Johan,
>
> quite hard to estimate what's going wrong, how do calc the projection
> matrix, near far clipp, viewmatrix, and so on.
>
> /adegli
>
> 2007/10/18, Johan Johnsson <eslave at gmail.com>:
>>
>> Hei !
>>
>> I dont know if its actually possible to tell exactly where the  
>> difference
>> is when comparing two viewfrustums.
>> We did get another frustum after the migration from osg1x to osg2x.
>> I attach 2 pictures showing them. (they get exactly the same values,  
>> from
>> a config file)
>>
>> --
>> Mr. Johan Johnsson
>> AutoSim AS, Strandveien 106, 9006 Tromsø
>> Visit us at http://www.autosim.no
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>>
>
>



-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no



More information about the osg-users mailing list