Re: [osg-users] Linking error on Windows with SVN Trunk: Traits constructor is unresolved.
Hi Robet Paul, Paul Martz wrote: This is a pending submission. Please see the osg-submissions post by me with subject osgViewer Wn32 GL3 context creation. Great! I didn't see this submission was related to the link error. Robert Osfield wrote: This morning I checked in this fix, the rest of the submission and a number of other fixes too so do an svn update and hopefully everything will be compiling and running sweetly. It compiles, links and works fine! Thanks. Vincent Gadoury ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Linking error on Windows with SVN Trunk: Traits constructor is unresolved.
Hi, I just updated from SVN Trunk (revision 10745) and I get many link error about the osg::GraphicsContext::Traits constructor as an unresolved symbol (from osgViewer and some other projects). I'm on Windows Vista, with Visual Studio 2005. I did regenerate the projects with cmake, did a clean and full rebuild, rebuilt specifically GraphicsContext.cpp and the osg library, nothing helped. The Traits constructor never appears in osgd.lib/.dll. I tried adding an OSG_EXPORT in front of the Traits class (GraphicsContext line 69) and it fixed the build. Does anyone has the same issue, or am I doing something wrong? Thanks, Vincent Gadoury ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Double-click concern.
Hi all, Is there a convention about input events sequences in OSG? I first thought that click and drag sequence would always be: push - [drag]* - release. This should work fine for most cases. The problems come with the double-click event. Although the name of the event refers to a click which usually means a push-release pair, the EventQueue::mouseDoubleButtonPress method is used to adapt the event. This method imply that the event is actually a button press. As an example, this is corroborated by Qt which documents its MouseButtonPress as Mouse press event and its MouseButtonDblClick as Mouse press again event. I have done two tests, one with the osgManipulator example and one with a viewer adapted on Qt, both on Windows Vista. All tests show that the actual double-click sequence is: push - release - doubleclick - [drag]* - release. The problem I see is that the double-click (actually the second-push) breaks the assumption that a drag follows a push This can be seen in most OSG objects that implicitly make this assumption, as about nothing in OSG currently treat the 'doubleclick' event. From example, if you double-click+drag on a Dragger, it ignores the 'drag' events, since they were preceded by a 'release' event that sets the dragger as inactive. I was wondering if this is an intended behaviour? regards, Vincent Gadoury ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgslice Error Message
Hi, The osgslice example fails on windows vista on revision 10691. GraphicsContext::setWindowingSystemInterface is never called because the static object RegisterWindowingSystemInterfaceProxy createWindowingSystemInterfaceProxy in GraphicsWindowWin32.cpp is never instantiated. Even if not using the viewer, the example is supposed to link with osgViewerd.lib, but it seems the global object is just wiped out for a reason I can't explain... Creating a dummy viewer at the end of the main function force the instantiation of the global object and lets the example run. Tested in debug on Visual Studio 2005. This really looks like a compiler issue... regards, Vincent Gadoury -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18743#18743 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with AutoTransform and picking (osgManipulator)
The problem is now resolved. I have many tabs displaying the same scene graph in my application. One of the tab had a broken (NaN) projection matrix because of a nice window resize to a [0,0] dimension on creation (thanks Qt!) I was using a second tab with a second osgViewer, without caring too much about the first one. The problem is that the two viewers were using the same scene graph, and the intersection test seems to be done between the first (broken) viewer cull and the second (correct) viewer cull traversal. Thus the bounding sphere of the AutoTransform object was invalid when doing the intersection test, because computed using the broken projection matrix. The TrackballDragger was correctly displayed because the AutoTransform was fixed in the second viewer cull traversal, using the correct projection matrix, before rendering (or at least, that's what I assume). I admit this use of many viewers on the same scene graph is not clean, but it is a test application. At least I fixed the broken viewer by not resizing its window down to [0,0]. I suppose there is an easy way to share the same scene graph between many viewers without clashing on view-dependent objects like this? regards, Vincent Gadoury Vincent Gadoury wrote: Hi, I have a problem with picking a dragger when an AutoTransform is active. In fact, the problem occurs with any LineSegmentIntersection with objects inside an AutoTransform. I can resume my case to using the osgManipulator::TrackballDragger with useAutoTransform=true. Basically, I create a TrackballDragger and add it as a child of the root node (just to test), then run an intersection test when I click (as in the osgManipulator example): view-computeIntersections(ea.getX(),ea.getY(),intersections) If I create the Trackball with useAutoTransform=false, everything works fine, it gets intersected and highlights. But if I create the trackball with useAutoTransform=true, it never intersects. In fact, IntersectionVisitor::apply(osg::Transform transform) is never called. The trackball displays correctly. I've tested with a really basic application (based on the osgManipulator example) and it works fine: int main() { osgViewer::Viewer viewer; osg::ref_ptrosg::Group loadedModel = new osg::Group; osg::ref_ptrosgManipulator::TrackballDragger dragger = new osgManipulator::TrackballDragger(true); dragger-setupDefaultGeometry(); loadedModel-addChild(dragger); viewer.setSceneData(loadedModel.get()); viewer.addEventHandler(new PickModeHandler()); // From osgmanipulator example. return viewer.run(); } My application does about the same thing (except being more complex of course). So obviously I'm missing something in my application, or doing something wrong. And I can't catch what it is. Does somebody have a clue about what can make an intersection test not work with an auto-transformed object? I understand that it's hard to tell without seeing the specific application's code, but to me the application is quite straightforward. I'm currently using OSG version 2.9.2. regards, Vincent Gadoury ___ 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] Clarification on use of Manipulators in CAD-Style app
Hi Robert, Robert Osfield wrote: Hi Vincent, On Tue, Oct 6, 2009 at 5:19 PM, Vincent Gadoury vgado...@humancad.com wrote: It seems there is a glitch with the new osgManipulator event handling and the TrackballManipulator. In the osgmanipulator example, if you keep ctrl or 'a' pressed when you rotate the trackball using the left mouse button, the trackball might get crazy (rotating of arbitrary - probably high - angle). The trick to reproduce the bug is to try to release the mouse button on a dragger. I'm able to reproduce it constantly. I was never able to reproduce it when the ctrl or 'a' key were not pressed. I tested it on revisions 10593 and 10606. Could you have a bash at tracking it down as I can't track down something I can't reproduce. I've done a little investigation and it is not directly related to osgManipulator, although the TabBoxDragger seems to create the perfect environnemnt to reproduce it (at least on my machine). The problem is that sometimes two mouse-dragging events are sent to the TrackballManipulator with a very little time difference. It might be system specific (I'm on Windows Vista 64-bit). If you happen to release the mouse button just after these events, the trackball's throwScale value will become huge (around 100 instead of around 1) and the trackball will start spinning randomly or zoom to great distances. I tracked the occurrence of these events by outputting the time difference on drag events in TrackballManipulator.cpp with something like: [code] static double lastDragTime = ea.getTime(); osg::notify(osg::NOTICE)dt: ea.getTime() - lastDragTimestd::endl; lastDragTime = ea.getTime(); [/code] I usually get time differences between 0.02 and 0.005, both with a key pressed or not. But in osgManipulator with a TabBoxDragger (or TabBoxTrackballDragger) in the scene, I start getting sparse events with a dt 0.0002. And if I keep any key pressed, I get these reading regularly about every second, which might be related to key repeating. It helps if you move the mouse quickly. I was also able to reproduce the glitch in osgteapot, where I get a few events with a dt around 7e-5, usually following dt 0.01. It seems unrelated to key state. Unfortunately, that's as deep as I can investigate. And I'm sorry about hijacking this topic with a not-so-related bug. Using the new osgManipulator with ctrl pressed was the first way I found to reproduce the glitch. regards, Vincent Gadoury ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Clarification on use of Manipulators in CAD-Style app
Hi Robert, It seems there is a glitch with the new osgManipulator event handling and the TrackballManipulator. In the osgmanipulator example, if you keep ctrl or 'a' pressed when you rotate the trackball using the left mouse button, the trackball might get crazy (rotating of arbitrary - probably high - angle). The trick to reproduce the bug is to try to release the mouse button on a dragger. I'm able to reproduce it constantly. I was never able to reproduce it when the ctrl or 'a' key were not pressed. I tested it on revisions 10593 and 10606. Unfortunately, I did not have the time to track it down (it's not a big problem for me at the moment). I just wanted to let you know about it. Also, are there any clues about when 2.9.6 will be released(/tagged)? regards, Vincent Gadoury Robert Osfield wrote: Hi Andrew, In the svn/trunk version of the OSG I have refactored osgManipulator a bit to make it more flexible and easier to use. I would strongly suggest having a look at it as the extra complexity of CommandManager is no longer needed, also you no longer need to implement your own event handling, as osgManipulator can now automatically pick up on events. There is also a new callback support that allows you to move objects around in the scene to follow manipulators. Robert. On Fri, Sep 25, 2009 at 1:58 PM, Andrew Thompson andyb1...@yahoo.co.uk wrote: Hi there, I am developing a CAD-Style application and am interested in using osgManipulator to provide picking, moving, rotating and scaling of objects. I just have a couple of questions with regard to the use of manipulators, and hope some of you can take the time to answer them for me. Firstly my application currently has a relatively flat scenegraph, where each Object in the CAD app is arranged as follows: Code: PositionAttitudeTransform | Geode | Geometry Then I have N Objects arranged as above in the scene that are a child of the root scene node (so a flat scene graph). From my understanding from reading the osgManipulator example, to manipulate an object I can use the following hierarchy: [Image: http://i137.photobucket.com/albums/q217/andyb1979/manpulatorhierachy.png ] In this diagram Geode is the object I want to manipulate, so I would replace that with the PAT from my 3D Object implementation, Selection wraps the object to manipulate, Dragger can go anywhere in the scene and the CommandManager links the Dragger to the Selection. So -- some questions on how I may use this in my app: * Firstly, to select an object, I pick it. At this point should I create a Selection and place in-between my 3D object and SceneRoot? Or can selection be anywhere and just place the object as a child of that? * Secondly can the dragger be anywhere in the scene hierachy or must it be a parent of the selection? * Similarly, does the Selection have to be specifically put between my 3D object and the scene root (In a CAD-Style app I will be selecting/deselecting objects quite regularly) * Say my object has a transform applied to it by its PositionAttitudeTransform. I need to somehow get that transform, apply to the dragger, then let the user manipulate it and apply the resultant transform to the PAT, removing the dragger/selection from the scene. Any ideas how this could work? * Is there a way to get an event or call-back out for each translate, rotate, scale operation as I need to push these into an undo-redo stack * Finally, could the above be modified to work with multiple objects in the same selection and how would I apply the Dragger transform to all of them before/after the event? Thanks for your time, any insights would be gratefully received. Andrew[/list] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17650#17650 ___ 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org