[osg-users] osgViewer::View::getCameraContainingPosition() returns weird results when using slave cameras
Jason Beverage
jasonbeverage at gmail.com
Wed May 28 09:48:41 PDT 2008
Hi Glenn,
Did you ever find a fix for this issue? I believe I might be running into
the same problem.
Thanks,
Jason
On Tue, Mar 25, 2008 at 8:24 AM, Glenn Waldron <gwaldron at gmail.com> wrote:
> Yes, I think you are right, it's something in that vein. I can trick it
> into returning the correct result by scaling the input (normalized)
> coordinates to compensate for the change in the viewport aspect ratio. So
> that implies that somewhere, old values are still lurking around.
>
> Thanks again for your thoughts on this - I will revisit the issue when time
> allows :)
> Glenn
>
>
> On Tue, Mar 25, 2008 at 12:56 AM, Guy <guy at dvp.co.il> wrote:
>
>> Hello,
>> I'm not sure about the problem you are talking about, but just give a
>> suggestion that might help.
>> Maybe the slave camera cache its size, the cache does not update with
>> the
>> Viewport change, and then the intersection takes the data from the
>> cache?
>> You could try to clear the cache and see if the problem continues.
>> And of course maybe it has nothing to do with it, and then I apologize
>> for wasting your time.
>>
>> Guy.
>>
>>
>> -----Original Message-----
>> From: osg-users-bounces at lists.openscenegraph.org
>> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
>> Jean-S?bastien Guay
>> Sent: Monday, March 24, 2008 10:03 PM
>> To: OpenSceneGraph Users
>> Subject: Re: [osg-users] osgViewer::View::getCameraContainingPosition()
>> returns weird results when using slave cameras
>>
>> Hi Glenn,
>>
>> > In a nutshell, I am using a single slave camera (in order to embed my
>> > OSG surface in a .NET control). If I resize the viewport after
>> creation,
>> > computeIntersections() no longer returns correct results -- the Y
>> value
>> > is incorrectly scaled. It only works correctly if I resize the window
>> > back to its original aspect ratio.
>>
>> Yes, that sounds like a different problem. In my case, I was not getting
>>
>> correct results from computeIntersections() whenever CompositeViewer was
>>
>> using a single view with slave cameras - no resizing at all involved,
>> just using setUpViewAcrossAllScreens().
>>
>> You'll have to dig further. I suggest you try starting with a breakpoint
>>
>> in Viewer/CompositeViewer::eventTraversal() (depending on the viewer
>> type you use) and compare the behavior before and after resizing the
>> viewport.
>>
>> Good luck,
>>
>> J-S
>> --
>> ______________________________________________________
>> Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
>> http://www.cm-labs.com/
>> http://whitestar02.webhop.org/
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
>> g<http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
>
> --
> Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080528/8e6651e0/attachment.htm>
More information about the osg-users
mailing list