[osg-users] Trackball Manipulator change FOV
Hello, please correct me if I should be false. With the trackball manipulator i can change the UpVector, the Position, and the Point the camera is looking at. Can I Also change the Perspective Projection Matrix, espacially the vertical FOV ? Thank you! David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball Manipulator change FOV
Hi David, On 10 January 2013 12:43, DavidHornung horn...@googlemail.com wrote: please correct me if I should be false. With the trackball manipulator i can change the UpVector, the Position, and the Point the camera is looking at. Can I Also change the Perspective Projection Matrix, espacially the vertical FOV ? The camera manipuataors all just create a view matrix that is applied to the viewer's Camera, they don't modify the projection matrix. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Trackball manipulator start position
Hi, I'm trying to modify simple application osgViewer. I want to set the initial position of the camera (trackball manipulator). How? I try to set it with setByMatrix, setByInverseMatrix but nothing. can you explain me? thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39836#39836 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball manipulator start position
Hi Daniele, Try setHomePosition(..). Robert. On Fri, May 27, 2011 at 11:56 AM, daniele argiolas arj...@gmail.com wrote: Hi, I'm trying to modify simple application osgViewer. I want to set the initial position of the camera (trackball manipulator). How? I try to set it with setByMatrix, setByInverseMatrix but nothing. can you explain me? thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39836#39836 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball manipulator start position
ok!!! thank you very much! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39841#39841 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Trackball Manipulator and RTT
Hi, I'm rendering a scene to texture and display it later on on an orthoquad with an orthocam.., now I want to manipulate the rtt cam (obviously not the orthocam) with a trackball manipulator. Could anybody point me to a tutorial or give me some addvise on where to start here!? Thank you! Cheers, Thomas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34410#34410 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball Manipulator and RTT
HI Thomas, The osgdistortion example sets up a render to texture slave camera that renders the scene along with inheriting the view matrix from the master Camera or the view, it uses a relative reference frame to achieve this. A second slave camera is used to a that has an absolure reference frame so ignores the views master camera. The camera manipulator (the trackball in your case) controls the viewer's master camera's view matrix. Robert. On Thu, Dec 2, 2010 at 12:36 PM, Thomas Klemmer klem...@uni-weimar.de wrote: Hi, I'm rendering a scene to texture and display it later on on an orthoquad with an orthocam.., now I want to manipulate the rtt cam (obviously not the orthocam) with a trackball manipulator. Could anybody point me to a tutorial or give me some addvise on where to start here!? Thank you! Cheers, Thomas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34410#34410 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Trackball manipulator and screen distance with stereo
Hi, I am trying to do a stereo application to show a terrain and anything it contains. I have used a modified trackball manipulator to capture mouse events, and move the camera. Also, I have configured the stereo inside this modified manipulator (as I have readen in other post). The problem is that, when I try to configure the screen distance (ds-setScreenDistance(camera.focallength)), the final visualization don't change, so the zero paralax is always the center of the trackball. The question is: Can I change this distance from inside the manipulator? Is there any other method to change this distance? Thank you! (And sorry my poor english) Cheers, Jon -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26823#26823 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball manipulator and screen distance with stereo
In my custom camera Manipulator I had to override the getFusionDistanceValue() function to get the desired effect. You can do the same by creating a child class of TrackballManipulator and use this instead. By default it returns _distance, which is the distance from the camera to the trackball center. You may want to return some other value instead to shift the fusion distance towards the observer or away from it. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball manipulator and screen distance with stereo
Hi Christian, Thank you very much for your answer! :D I can't override the virtual function (I don't know why, but it dont works) :O. However, I can change the value of _distance, and it doesn't change the other features. Thank you again! Cheers, Jon -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26850#26850 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball manipulator and screen distance with stereo
I can't override the virtual function (I don't know why, but it doesn't work) :O. If you're using Visual C++ try using the override keywordhttp://msdn.microsoft.com/en-us/library/41w3sh1c.aspxto ensure you've got the correct function signature. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball manipulator and screen distance with stereo
Hi Michael, I didn't know that signature. Thank you for your answer! Cheers, Jon -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26856#26856 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Trackball Manipulator in OpenGL + OSG
Hi, everybody, I used viewer-setUpViewerAsEmbeddedInWindow way as Robert suggested to embed an OSG window in OpenGL context. Then I tried to setup Manipulator like Trackball, I did some code like this: osg::observer_ptrosgViewer::GraphicsWindow gw = viewer-setUpViewerAsEmbeddedInWindow(...) if(event-button() == Qt::LeftButton) button = 0; else if(event-button() == Qt::RightButton) button = 2; In mousePressEvent: if(gw-valid() isInRange(event-x(), height - event-y())) (gw-getEventQueue())-mouseButtonPress(event-x(), event-y(), button + 1); In mouseReleaseEvent: if(gw-valid() isInRange(event-x(), height - event-y())) (gw-getEventQueue())-mouseButtonPress(event-x(), event-y(), button + 1); isInRange Function judge if event happen in the OSG window. Problem is when I only use left key, or only use right key, no problem at all. But if I switch once, then it just pan the whole scene, both keys lost their own ability. anybody has any idea about it? Thank you. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9097#9097 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball Manipulator in OpenGL + OSG
please ignore my question. I just made something stupid. [Laughing] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9100#9100 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] trackball manipulator and axis alignment
Hi Peter, If you want to set the home position of a manipulator then use the MatrixManipulator::setHomePosition(...) method. viewer.getCameraManipulator()-setHomePosition(...); Robert. On Wed, Jan 30, 2008 at 4:55 AM, Peter DeSantis [EMAIL PROTECTED] wrote: Hello I may be wrong about this, but it seems that if you set a modelview matrix to osg::matrix::identity(), and add it to the default viewer camera, osg axis alignemnt is changed to the opengl default, and the camera views the xy plane infront (so to speak) but then adding a trackball manipulator seems to re-orientate the camera to look at the xz plane which is the default osg axis alignment. How can you stop that axis shift from happening, so that i can have the traclball manipulator but the camera is still orientated to default opengl axis alignment ? or better still is there better way to make the viewer default axis alignment equal to the opengl default, so that both the default viewer camera, model matrix and the trackball manipulator use the default opengl axis alignment from scratch. That way i can still use viewer.run() to run my viewer and not lose my geometry. Thanks Peter DeSantis [EMAIL PROTECTED] Jumbo Vision International Pty Ltd Unit 2 ,1 Aitken Way Kewdale WA 6105 Australia Tel: 61 8 9353 6200 Fax: 61 8 9353 6211 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Trackball manipulator
Hello to all (and welcome back Robert!), I have 2 questions about the Trackball manipuator 1- In my application I have multiple views each with a model in it (and a trackball manipulator) and when I select a view I want all the other views to stop from rotating if they are. Is there a way to programmatically stop the Trackball manipulator's automatic rotation? 2- I would like to see two models on the very same view one over the other even if they are intersecting each other, in order to compare their shapes. The problem is that I also need to rotate them independently, which means that I cannot simply manipulate the camera but I need to really rotate each object independently one at a time. Can I accomplish this somehow using the TrackballManipulator? thanks, Michele ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball manipulator
Hi Michele, On Fri, Feb 15, 2008 at 11:20 AM, Michele Bosi [EMAIL PROTECTED] wrote: Hello to all (and welcome back Robert!), I have 2 questions about the Trackball manipuator 1- In my application I have multiple views each with a model in it (and a trackball manipulator) and when I select a view I want all the other views to stop from rotating if they are. Is there a way to programmatically stop the Trackball manipulator's automatic rotation? There isn't a way right now. The easiest way to do it would probably be to add a virtual method into MatrixManipulator to enable the toggling on/off of any animation. Feel free to add this and send me the changes. 2- I would like to see two models on the very same view one over the other even if they are intersecting each other, in order to compare their shapes. The problem is that I also need to rotate them independently, which means that I cannot simply manipulate the camera but I need to really rotate each object independently one at a time. Can I accomplish this somehow using the TrackballManipulator? You could do this by having two Views that use the same viewport settings so they overlap, but turn off the colour buffer clear for the second view via view.getCamera()-setClearMask(), you'll also need to the Camera's RenderOrder to make sure the one with clear off is drawn second. One could possible attach the same camera manipulator to each view and turn of the event handling for one of the views. Alternatively on each frame you could just sync the view matrix on the second manipulator with the setting from the first view. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Trackball manipulator
Thank you Robert, it was very enlightning :) Michele On Fri, Feb 15, 2008 at 2:15 PM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Michele, On Fri, Feb 15, 2008 at 11:20 AM, Michele Bosi [EMAIL PROTECTED] wrote: Hello to all (and welcome back Robert!), I have 2 questions about the Trackball manipuator 1- In my application I have multiple views each with a model in it (and a trackball manipulator) and when I select a view I want all the other views to stop from rotating if they are. Is there a way to programmatically stop the Trackball manipulator's automatic rotation? There isn't a way right now. The easiest way to do it would probably be to add a virtual method into MatrixManipulator to enable the toggling on/off of any animation. Feel free to add this and send me the changes. 2- I would like to see two models on the very same view one over the other even if they are intersecting each other, in order to compare their shapes. The problem is that I also need to rotate them independently, which means that I cannot simply manipulate the camera but I need to really rotate each object independently one at a time. Can I accomplish this somehow using the TrackballManipulator? You could do this by having two Views that use the same viewport settings so they overlap, but turn off the colour buffer clear for the second view via view.getCamera()-setClearMask(), you'll also need to the Camera's RenderOrder to make sure the one with clear off is drawn second. One could possible attach the same camera manipulator to each view and turn of the event handling for one of the views. Alternatively on each frame you could just sync the view matrix on the second manipulator with the setting from the first view. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org