[osg-users] Camera manipulator changes for inverted y axis

2016-10-04 Thread Tunc Bahcecioglu
Hi, I reverted the y axis by adjusting the camera projection matrix: Code: camera->setProjectionMatrixAsPerspective(30.0f, static_cast(traits->width) / static_cast(traits->height), 1.0f, 1.0f); auto originalProjection = camera->getProjectionMatrix(); osg::Matrixd reverseYMat;

Re: [osg-users] Camera Manipulator needs to apply projection matrix extents in update traversal

2013-07-19 Thread Nick McEvoy
Yes I guess we could do via an EventHandler (which we have done for other things interested in events) except all our various extended 'camera manipulators' are added (i.e. set active) via the View::setCameraManipulator(osgGA::CameraManipulator*) ... so sticking to the pattern this particular

Re: [osg-users] Camera Manipulator needs to apply projection matrix extents in update traversal

2013-07-18 Thread Robert Osfield
HI Nick, The svn/trunk and recent dev releases of the OSG have a CameraManipulator::updateCamera(osg::Camera) method that allows you to set any properties you want on the View's Camera rather than pulling the view matrix as was done previously. The other bit of the jigsaw for you specific

Re: [osg-users] Camera Manipulator needs to apply projection matrix extents in update traversal

2013-07-18 Thread Nick McEvoy
Excellent, the new updateCamera() method on the trunk sounds exactly what we need ! :) We are on osg 3.0.1 so for now, so until we update to the latest, I've just put in our work around which connects our active manipulator to the camera's update callback and that seems to work ok. Also just

Re: [osg-users] Camera Manipulator needs to apply projection matrix extents in update traversal

2013-07-18 Thread Robert Osfield
Hi Nick, On 19 July 2013 00:08, Nick McEvoy nmc...@gmail.com wrote: Excellent, the new updateCamera() method on the trunk sounds exactly what we need ! :) We are on osg 3.0.1 so for now, so until we update to the latest, I've just put in our work around which connects our active manipulator

Re: [osg-users] Camera Manipulator needs to apply projection matrix extents in update traversal

2013-07-17 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Nick, On 07/17/2013 03:56 AM, Nick McEvoy wrote: I'm writing a camera manipulator but have an issue where I need the manipulator to be visited during the update traversal ( after the scene graph has been updated). Without going into too much

[osg-users] Camera Manipulator needs to apply projection matrix extents in update traversal

2013-07-16 Thread Nick McEvoy
I'm writing a camera manipulator but have an issue where I need the manipulator to be visited during the update traversal ( after the scene graph has been updated). Without going into too much detail ... the basic reason I require this is ... that my manipulator needs to set the orthographic

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-30 Thread Robert Osfield
Hi Judson, On 29 May 2013 15:01, Judson Weissert jud...@mfrac.com wrote: My fault, I performed an invalid test. My osgviewer.cpp source was modified, and I did not realize it. It was still overriding checkNeedToDoFrame(). I retested, and it appears to be working as expected. Sorry about

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-29 Thread Robert Osfield
Hi Judson, On 28 May 2013 20:36, Judson Weissert jud...@mfrac.com wrote: I just got the 3.1.7 developer release built. Running the osgviewer application with arguments --run-on-demand --screen 1 dumptruck.osgt results in a regression where the viewer does not respond to mouse or keyboard

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-29 Thread Judson Weissert
Robert, My fault, I performed an invalid test. My osgviewer.cpp source was modified, and I did not realize it. It was still overriding checkNeedToDoFrame(). I retested, and it appears to be working as expected. Sorry about that. I will continue testing and report back my findings if I find

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-28 Thread Judson Weissert
Robert, This is great news! I will try out the new code as soon as possible and report back my findings. Thanks, Judson On 5/24/2013 5:42 AM, Robert Osfield wrote: Hi Judson. I have refactored the Viewer/CompositeViewer::checkNeedToDo() method so that it now calls a new

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-28 Thread Judson Weissert
Hi Robert, I just got the 3.1.7 developer release built. Running the osgviewer application with arguments --run-on-demand --screen 1 dumptruck.osgt results in a regression where the viewer does not respond to mouse or keyboard input (does not render any new frames, does not allow me to exit

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-24 Thread Robert Osfield
Hi Judson, On 23 May 2013 21:57, Judson Weissert jud...@mfrac.com wrote: I just realized that the modification to osgViewer::Viewer is not actually required to reproduce the problem in the osgviewer application since there are no update callbacks installed anyway. Originally, I could not get

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-24 Thread Robert Osfield
Hi Judson. I have refactored the Viewer/CompositeViewer::checkNeedToDo() method so that it now calls a new Viewer/CompositeViewer::checkEvents() method that checks for available events rather than rely upon the more heavier weight eventTraversals() method. The eventTraversals() method design is

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-23 Thread Robert Osfield
Hi Judson, Great detective work. The change to the frame() was done to avoid issues with events being given times that aren't in sequence - previously we'd get time delta's that could be negative. Do you have an idea of how to reproduce the problem now? Once I can reproduce it I'll be able to

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-23 Thread Judson Weissert
Robert, I figured out why my case diverges from the osgviewer application. I override osgViewer::Viewer::checkNeedToDoFrame(), member function, and call eventTraversal() on a code path where it would otherwise not be called. Specifically, I don't want the default behavior where a new frame

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-23 Thread Robert Osfield
Thanks for the code reproducing the problem, I'm just turning in for the day so will have a look at trying to reproduce the issue tomorrow. On 23 May 2013 18:32, Judson Weissert jud...@mfrac.com wrote: Robert, I figured out why my case diverges from the osgviewer application. I override

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-23 Thread Judson Weissert
Thanks Robert. I just realized that the modification to osgViewer::Viewer is not actually required to reproduce the problem in the osgviewer application since there are no update callbacks installed anyway. Originally, I could not get the behavior to happen in the unmodified osgviewer

[osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-22 Thread Judson Weissert
Hello, I have recently upgraded to the 3.1.6 development release of the OSG library (from 3.1.2) and encountered some behavior changes when manipulating a model using the Trackball Manipulator (I did derive from it though and modify some non-mouse related features). Compiled by VS2010,

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-22 Thread Robert Osfield
HI Judson, I have done a refactor of osgViewer's internally handling of mouse events to allow for seamless handling of distortion correction set ups, there is chance that this might have broken something that I haven't yet observed in my own testing. Other than this there hasn't been any changes

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-22 Thread Judson Weissert
Robert, On 5/22/2013 10:23 AM, Robert Osfield wrote: HI Judson, I have done a refactor of osgViewer's internally handling of mouse events to allow for seamless handling of distortion correction set ups, there is chance that this might have broken something that I haven't yet observed in my own

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-22 Thread Judson Weissert
Robert, The viewer I am running has ON_DEMAND frame updates. When I remove the line viewer-setRunFrameScheme (osgViewer::ViewerBase::ON_DEMAND); the disappearing geometry behavior goes away. However, I was not able to replicate the problem by applying ON_DEMAND frame updating to the

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-22 Thread Robert Osfield
Hi Judson, It's a curious set of circumstances but as yet I can't think of a specific cause. Is there any chance you can create a small example that illustrates the problem so that I can try it out and see if I can spot the problems. Cheers, Robert. On 22 May 2013 18:31, Judson Weissert

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-22 Thread Judson Weissert
Robert, I have made some progress. The problem appears to be caused by an eventTimeDelta of zero which is calculated within StandardManipulator::performMovement(). It eventually results in a divide by zero and the propagation of non-finite value(s) through the remainder of the call chain.

Re: [osg-users] Camera Manipulator or culling behavior change 3.1.2 vs 3.1.6

2013-05-22 Thread Judson Weissert
Robert, I found the revision that caused the regression. Ironically, it occurred way before the 3.1.6 release... See r13092 associated with http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk/src/osgViewer/Viewer.cpp The 3.1.2 behavior returned when I reverted that revision. A notable

[osg-users] Camera manipulator zoomFactor

2013-03-21 Thread Peter Bako
Hi, Is there an easy way to invert the wheel zoom factor on TrackballCameraManipulator? I have a feeling that once I've seen a property where you can set this, and if you set it to -1, the zoom scrolling will behave opposite. I have a cameraManipulator derived from TrackballCam..Man.. the

Re: [osg-users] Camera manipulator zoomFactor

2013-03-21 Thread Peter Bako
I am sorry about the useless topic. I was searching the property on a wrong object manipulator-setWheelZoomFactor() -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53189#53189 ___ osg-users

Re: [osg-users] Camera Manipulator problem

2013-02-19 Thread Robert Osfield
Hi Peterakos, There isn't any way a third party will be able to diagnose the problem with your code with such a tiny extract of code. The best I can suggest is develop your own skills of hunting down and fixing bugs. Using a debug to see the flow of control, or add debug message that output

[osg-users] Camera Manipulator problem

2013-02-18 Thread Peterakos
Hello. I try to make my own camera manipulator in which the push events with X lower than the half of the window will be ignored. I created a class, which derives trackball manipulator. Here is the handle method virtual bool handle( const osgGA::GUIEventAdapter ea, osgGA::GUIActionAdapter us )

Re: [osg-users] Camera manipulator velocity and home() calculation affected after scaling nodes

2012-09-17 Thread Regina Howard
You can find it from the settings. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49674#49674 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Camera manipulator velocity and home() calculation affected after scaling nodes (partially resolved)

2012-08-28 Thread Judson Weissert
On 8/27/2012 3:14 PM, Jeremy Moles wrote: A Drawable can have a special ComputeBoundsCallback() (something like that, I'm on my phone right now and can't look it up), so you could use that as well... Here is the code I came up with after your suggestion that does resolve my problem (I attach

[osg-users] Camera manipulator velocity and home() calculation affected after scaling nodes

2012-08-27 Thread Judson Weissert
Hello, I was hoping someone could help me with a camera manipulator/scaling problem that I have been having. I have a scene graph that contains geometry representing a hydraulic fracture. The fracture length is of the order 1000ft, the height is of the order 100ft, and the width is of the order

Re: [osg-users] Camera manipulator velocity and home() calculation affected after scaling nodes

2012-08-27 Thread Jeremy Moles
On Mon, 2012-08-27 at 13:54 -0400, Judson Weissert wrote: Hello, I was hoping someone could help me with a camera manipulator/scaling problem that I have been having. I have a scene graph that contains geometry representing a hydraulic fracture. The fracture length is of the order 1000ft,

Re: [osg-users] Camera manipulator velocity and home() calculation affected after scaling nodes

2012-08-27 Thread Jeremy Moles
On Mon, 2012-08-27 at 15:12 -0400, Judson Weissert wrote: On 8/27/2012 2:22 PM, Jeremy Moles wrote: On Mon, 2012-08-27 at 13:54 -0400, Judson Weissert wrote: Hello, I was hoping someone could help me with a camera manipulator/scaling problem that I have been having. I have a scene

Re: [osg-users] Camera manipulator velocity and home() calculation affected after scaling nodes

2012-08-27 Thread Judson Weissert
On 8/27/2012 2:22 PM, Jeremy Moles wrote: On Mon, 2012-08-27 at 13:54 -0400, Judson Weissert wrote: Hello, I was hoping someone could help me with a camera manipulator/scaling problem that I have been having. I have a scene graph that contains geometry representing a hydraulic fracture.

Re: [osg-users] camera manipulator proposal

2012-07-10 Thread Riccardo Corsi
Hi Robert, I agree that the Camera as an argument makes more sense. Thanks for merging the submission. Cheers, Ricky On Mon, Jul 9, 2012 at 7:38 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Riccardo, On review of the submission I've decided that passing in a Camera rather than a

Re: [osg-users] camera manipulator proposal

2012-07-09 Thread Robert Osfield
Hi Riccardo, Sorry for the very long delay in getting to review your suggested changes, I've now done the review and the changes look good, the only amendment I made to rename the parameter name Camera* pCamera to Camera* camera as from the context it's obvious that camera is a Camera* one

Re: [osg-users] camera manipulator proposal

2012-07-09 Thread Robert Osfield
Hi Riccardo, On review of the submission I've decided that passing in a Camera rather than a pointer would make it clear that a valid Camera object should be passed in rather than a pointer which could be NULL or pointing to a valid Camera object. This brings the method more into line with how

Re: [osg-users] camera manipulator proposal

2012-04-05 Thread Riccardo Corsi
Hi Robert and All, I just wanted to know if the proposal I made some weeks ago doesn't seem to fit some requirements, or simply passed unnoticed. Thank you, Ricky On Wed, Mar 14, 2012 at 15:42, Riccardo Corsi riccardo.co...@kairos3d.itwrote: Hi all, sorry that it took long to setup the

Re: [osg-users] camera manipulator proposal

2012-04-05 Thread Robert Osfield
Hi Riccardo, On 5 April 2012 11:37, Riccardo Corsi riccardo.co...@kairos3d.it wrote: I just wanted to know if the proposal I made some weeks ago doesn't seem to fit some requirements, or simply passed unnoticed. I'm afraid I haven't had a chance to review it yet. Robert.

[osg-users] Camera Manipulator?

2012-04-05 Thread Matthew Runo
Hello - I am attempting to use the output from an attitude heading reference system to orient the Camera over some terrain which I created using the National Elevation Dataset and VirtualPlanetBuilder. When I view the terrain database using osgviewer, I see everything as I expect.

Re: [osg-users] camera manipulator proposal

2012-03-06 Thread Robert Osfield
Hi Riccardo, The current osgGA::CameraManipulator's are a bit of mess, the way they just control the view matrix is one of their flaws. I merged a set of sweeping changes from Jan Perciva back in May 2010 that added a new inheritance hierarchy and more features, but in hindsight I feels these

Re: [osg-users] camera manipulator proposal

2012-03-06 Thread Riccardo Corsi
Hi Robert, I totally agree on the general approach. Still, if you want to go for the change on the osgGA::CameraManipulator base class as a first step, I'd be glad to help with that. Ricky On Tue, Mar 6, 2012 at 11:44, Robert Osfield robert.osfi...@gmail.comwrote: Hi Riccardo, The current

Re: [osg-users] camera manipulator proposal

2012-03-06 Thread Robert Osfield
HI Ricky, On 6 March 2012 14:36, Riccardo Corsi riccardo.co...@kairos3d.it wrote: I totally agree on the general approach. Still, if you want to go for the change on the  osgGA::CameraManipulator base class as a first step, I'd be glad to help with that. Why not have a bash at modifying

[osg-users] camera manipulator proposal

2012-03-05 Thread Riccardo Corsi
Hi Robert and All, in more than one occasion I've noticed that having access to the camera manipulator in use is not enough to have full control over the camera motion handling. An example is if you want to temporary disable the manip to set the camera position explicitly (in this case you need

Re: [osg-users] Camera Manipulator initial camera pos/orientation

2010-04-13 Thread Alberto Luaces
Ted Morris writes: Hi, I need to set an initial viewpoint of my camera manipulators with respect to the local coordinate system of the object. What is the best way to go about that? Hi Ted, I think that osg::Node::getWorldMatrices and osgGA::MatrixManipulator::setHomePosition can help

[osg-users] Camera Manipulator initial camera pos/orientation

2010-04-12 Thread Ted Morris
Hi, I need to set an initial viewpoint of my camera manipulators with respect to the local coordinate system of the object. What is the best way to go about that? Thanks! T -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26694#26694

[osg-users] Camera Manipulator

2010-02-02 Thread ted morris
Greetings, I'm running into a little snag here. I utilized the CameraNodeFollower Camera Manipulator as presented in the NPS tutorial. For all who don't know it basically attaches a node with a NodeCallback that obtains the current NodePath of the parent, and multiplies its own offset from the

[osg-users] Camera Manipulator problem

2010-02-01 Thread ted morris
Greetings all, I'm using the CameraManipulator from the NPS 11.x tutorial to follow a MatrixTransform object. The MatrixTransform position/orientation per usual with an Node UpdateCallback. The manipulator simply attaches a node to the MatrixTransform node with a callback which grabs the parent

Re: [osg-users] Camera Manipulator

2009-07-01 Thread Maxime BOUCHER
Hola, Let me ask it another way. I'm in a fragment shader. I have the vec4 gl_FragCoord. I do: Code: vec3 windowcoord = vec3(gl_FragCoord.xy, 1.0); vec3 clipcoord = viewportMatrixInverse * windowcoord; vec4 eyecoord = gl_ProjectionMatrixInverse * vec4(clipcoord, 1.0); eyecoord = eyecoord /

[osg-users] Camera Manipulator

2009-06-30 Thread Maxime BOUCHER
Hi, Really quick question. In a shader I get back a gl_FragCoord. I use it to try getting back in world space. I did it several ways and I really have the impression that piece of code: Code: ref_ptr osgGA::MatrixManipulator cammanipulator = new osgGA::TrackballManipulator();

[osg-users] Camera Manipulator

2009-04-07 Thread ami guru
Hello forum, I am going through the example osgimpostor to get the idea of how the quaternion camera is implemented there. The camera manipulator has been derived from the MatrixManipulator class and one of the function that has been over-ridden is setNode(); I would like to find out when

Re: [osg-users] Camera Manipulator

2009-04-07 Thread Alberto Luaces
Hi, Sajjad El Martes 07 Abril 2009ES 10:57:01 ami guru escribió: Hello forum, I am going through the example osgimpostor to get the idea of how the quaternion camera is implemented there. The camera manipulator has been derived from the MatrixManipulator class and one of the function that

Re: [osg-users] Camera Manipulator

2009-04-07 Thread Jean-Sébastien Guay
Hello Sajjad, I would like to find out when that particular function is called and who is calling that. I am definite that it is called, but could not find out who is calling that(some function in another class probably ). Basic debugging technique: Run the code in the debugger, put a