Re: [osg-users] osgQt Coverity Scan reported issue, Qt experts please chip in.
Hi Jan, El 24/6/2016 21:46, "Jan Ciger"escribió: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hello, > > On 24/06/16 20:32, Robert Osfield wrote: > > If you have a github account you should be able to login in with > > this account. Alternatively you can create your own account for > > Coverity. > > I have logged in with my Github account, but unless someone adds me to > the OpenSceneGraph project, I don't have access to the reports. > > > You can add yourself to the project as an observer/defect viewer. Otherwise you also can ask for permissions as a contributor. Me or Robert will add you as soon as you ask for it. Cheers. > > Attach is a screen snaptshot of the source browser. The source I > > also included in my previous post. > > > > > I've looked at the relevant code, copy and pasted below for > > reference. The issue looks to be related to mixing an int key value > > with the enum's defined in osgGA::GUIEventAdapter. I presume the > > key value is coming in from a Qt event, though I'm not 100% clear > > on this as I'm not the author of this code, no have Qt expertise. > > Yes, the problem is that the key is being passed into the function as > an instead of enum. It is coming from QEvent (line 136 of the same > file). The code is taking the Qt events and passing them to the OSG > event handling system using custom Qt events (a kludge necessary to > work around some Qt issues). > > To fix the problem the comparison should be done using the Qt key > codes instead: > > Change: > osgGA::GUIEventAdapter::KEY_Shift_L to Qt::Key_Shift > osgGA::GUIEventAdapter::KEY_Shift_R to Qt::Key_Shift as well > > osgGA::GUIEventAdapter::KEY_Control_L to Qt::Key_Control > osgGA::GUIEventAdapter::KEY_Control_R to Qt::Key_Control > > osgGA::GUIEventAdapter::KEY_Alt_L to Qt::Key_Alt > osgGA::GUIEventAdapter::KEY_Alt_R to Qt::Key_AltGr > > osgGA::GUIEventAdapter::KEY_Meta_L to Qt::Key_Meta > osgGA::GUIEventAdapter::KEY_Meta_R to Qt::Key_Meta > > > I don't think Qt makes distinction between left/right shift, control > and meta (windows) keys unless you use the native scan code, which is > platform-specific. > > You can find the full list here: > http://doc.qt.io/qt-5/qt.html#Key-enum > > Best regards, > > Jan > > -BEGIN PGP SIGNATURE- > Version: GnuPG v2 > > iD8DBQFXbY4sn11XseNj94gRAsTqAJ9mZ7BWmhrfNKNPSbjlw97UPMVb8QCfVuzK > 3exJN3eTbdmqx1pwgwPHeYw= > =Hs+F > -END PGP SIGNATURE- > ___ > 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] [build] OSX X11 Build System Failures
OK, looks like the fix could be Code: IF(APPLE AND NOT (OSG_WINDOWING_SYSTEM STREQUAL "Cocoa")) RETURN() ENDIF() This applies to avfoundation (which only compiles on OSX anyway), as well as osgmultitouch and osgoscdevice examples, which will continue to compile on non-apple platforms as before. At least this will allow everything to compile on OSX/X11 until someone gets around to modifying actual source code for OSX/X11 compatibility. Robert if you want, I can send the appropriate CMakeLists.txt files to submissions. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67808#67808 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgQt Coverity Scan reported issue, Qt experts please chip in.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, On 24/06/16 20:32, Robert Osfield wrote: > If you have a github account you should be able to login in with > this account. Alternatively you can create your own account for > Coverity. I have logged in with my Github account, but unless someone adds me to the OpenSceneGraph project, I don't have access to the reports. > > Attach is a screen snaptshot of the source browser. The source I > also included in my previous post. > > I've looked at the relevant code, copy and pasted below for > reference. The issue looks to be related to mixing an int key value > with the enum's defined in osgGA::GUIEventAdapter. I presume the > key value is coming in from a Qt event, though I'm not 100% clear > on this as I'm not the author of this code, no have Qt expertise. Yes, the problem is that the key is being passed into the function as an instead of enum. It is coming from QEvent (line 136 of the same file). The code is taking the Qt events and passing them to the OSG event handling system using custom Qt events (a kludge necessary to work around some Qt issues). To fix the problem the comparison should be done using the Qt key codes instead: Change: osgGA::GUIEventAdapter::KEY_Shift_L to Qt::Key_Shift osgGA::GUIEventAdapter::KEY_Shift_R to Qt::Key_Shift as well osgGA::GUIEventAdapter::KEY_Control_L to Qt::Key_Control osgGA::GUIEventAdapter::KEY_Control_R to Qt::Key_Control osgGA::GUIEventAdapter::KEY_Alt_L to Qt::Key_Alt osgGA::GUIEventAdapter::KEY_Alt_R to Qt::Key_AltGr osgGA::GUIEventAdapter::KEY_Meta_L to Qt::Key_Meta osgGA::GUIEventAdapter::KEY_Meta_R to Qt::Key_Meta I don't think Qt makes distinction between left/right shift, control and meta (windows) keys unless you use the native scan code, which is platform-specific. You can find the full list here: http://doc.qt.io/qt-5/qt.html#Key-enum Best regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v2 iD8DBQFXbY4sn11XseNj94gRAsTqAJ9mZ7BWmhrfNKNPSbjlw97UPMVb8QCfVuzK 3exJN3eTbdmqx1pwgwPHeYw= =Hs+F -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Realtime Pointpicking
Hi Daniel, The PolytopeIntersector is the simplest route. If you want to make things more efficient then you may well need to come up with a custom approach. The LineSegmentIntersector is able to take advantage of KdTree graphs if they have been built for your scene graph and enables O(logn) intersections instead of O(n), but unfortunately PolytopeIntersector doesn't support KdTrees yet. You are welcome to add it :-) The other approach you could take is to break your dataset into smaller chunks, such as dividing it into an octree so that the internal nodes of the octree can be culled before only the bricks that intersect the Polytope need to be tested exhaustively. Robert. Robert. On 24 June 2016 at 16:06, Daniel Neoswrote: > Hi, > > I have a Pickhandler and a dynamically changing scene which consists only of > a geometry node. To be more specific, the geometry node represents a point > cloud consisting over ~10 vertices. > > Using a line intersector makes it nearly impossible to get an intersection, > but the Intersector I am using, the polytopeintersector, needs ~200ms to get > an intersection, which is too long for my application. I need a 'smooth' > visualization of ~20-25fps and this would be definitley a bottleneck. > > Is there a more simple way to get intersections of a non-solid object fast? > > Here is my PickHandler. Input arguments in my application are the normalized > (x,y)coordinates from the GUIEventAdapter, buffer is the tolerance with 0.005 > and the viewer casted from the ActionAdapter. > > > Code: > > bool PickHandler::getPickedPoint(double x, double y, float buffer, > osgViewer::View* viewer) > { > osg::ref_ptr intersector(0); > try > { > intersector = new osgUtil::PolytopeIntersector( > osgUtil::Intersector::PROJECTION, > x - buffer, y - buffer, x + buffer, y + buffer); > } > catch (const std::bad_alloc&) > { > return false; > } > > // DimZero = check only for points > intersector->setDimensionMask(osgUtil::PolytopeIntersector::DimZero); > > intersector->setIntersectionLimit(osgUtil::Intersector::LIMIT_NEAREST); > osgUtil::IntersectionVisitor iv(intersector); > viewer->getCamera()->accept(iv); > > if (intersector->containsIntersections()) > { > osgUtil::PolytopeIntersector::Intersection intersection > = *(intersector->getIntersections().begin()); > > const osg::Vec3f& p = intersection.intersectionPoints[0]; > m_point.set(p[0], p[1], p[2]); > return true; > } > return false; > > > > > Thank you! > > Cheers, > Daniel[/code] > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=67797#67797 > > > > > > ___ > 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] osgQt Coverity Scan reported issue, Qt experts please chip in.
Hi Jan, On 24 June 2016 at 14:20, Jan Cigerwrote: > Could you, please, post the report from Coverity? Will try below, but the source/defect browser they provides a nice way of exploring related code so worth logging in if you can. > The link above demands > login from me. If you have a github account you should be able to login in with this account. Alternatively you can create your own account for Coverity. > I have done quite a bit of Qt development, so I can check > what the deal is. Title : Inferred misuse of enum Text: An enumeration value for one enum type may be misinterpreted as a different, unrelated enumeration value in a different type. An enumeration value in one type may have no meaningful interpretation in another enum type, leading to a range of logic errors. In osgQt::QGraphicsViewAdapter::handleKeyEvent(int, bool): An integer expression which was inferred to have an enum type is mixed with a different enum type Attach is a screen snaptshot of the source browser. The source I also included in my previous post. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Best way to cull object hidden by a mountain
Have you considered looking at osgEarth? There's a lot of capability there, including line rendering to textures with CSS-like styles using AGG. I've used it for this sort of thing, and when you're already DOING geospatial stuff, you should really think about using the OSG toolkit that was really designed for geospatial use.​ I'm happy to advise on it. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Pass an osg::Texture2D to CUDA driver api
I am wondering if the default setting to enable use of Display lists in OSG still makes a lot of sense nowadays. Christian 2016-06-24 18:20 GMT+02:00 Jannik Heller: > Hi Philipp, > > > > > > Also, Im having the issue that my drawCallback is only executed during > the first frame and then skipped. Ive disabled culling and depth testing. > > > > You need to disable display lists on your drawable. With display lists > enabled it will only draw once and then use the display list. This makes no > sense when using Cuda obviously. > > > > > > Does anyone know why that happens? From my understanding, the renderbin > number should determine the order of draw (and therefore also of the > drawCallback?) operations. > > > > I think this may also be related to the display list being enabled, the > compileGLObjects() that is run in the first frame will compile display > lists but not necessarily in the order of the render bins. > > Cheers, > Jannik > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=67803#67803 > > > > > > ___ > 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] Pass an osg::Texture2D to CUDA driver api
Hi Philipp, > > Also, Im having the issue that my drawCallback is only executed during the > first frame and then skipped. Ive disabled culling and depth testing. > You need to disable display lists on your drawable. With display lists enabled it will only draw once and then use the display list. This makes no sense when using Cuda obviously. > > Does anyone know why that happens? From my understanding, the renderbin > number should determine the order of draw (and therefore also of the > drawCallback?) operations. > I think this may also be related to the display list being enabled, the compileGLObjects() that is run in the first frame will compile display lists but not necessarily in the order of the render bins. Cheers, Jannik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67803#67803 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Best way to cull object hidden by a mountain
Am 24.06.2016 um 17:14 schrieb Valerian Merkling: Hi Robert, Thanks for your clarification about OccluderNode. I already looked at the osgocclusionquery example. If I'm right, it just need to add an OcclusionQueryNode to contain the node wich have to be occluded by the rest of the scene graph. I wasn't able to make it works so I may need to dig a bit. To be honest, I don't know if I will use OcclusionCulling at all, but I want to understand how it works and how it can be used. I don't want to be forced to, in a few month, rebuild all my app because I'm unable to use occlusion culling while really needing it. I'm also need to support a part of SLD (see here http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/lines.html), the "Line With Border" example. I want to use PolygonOffset to force the drawing order of my lines, and OcclusionCulling might be a good way to avoid depth buffer issues. If you are trying to display outlines it might be more efficient to use a shader, as your heightfield is most likely a regular grid, for which you can calculate barycentric coordinates easily. See [0], I used this myself by adding a Barycentric-Visitor which simply put, will add some vertex-attributes to the geometry which you then can use to have outlines. As the rendering is in the same primitive, there won't be any depth-related issues. Cheers Sebastian [0] http://codeflow.org/entries/2012/aug/02/easy-wireframe-display-with-barycentric-coordinates/ Anyway, thanks again for your help. And if you have any tips about OcclusionQueryNode I'll take it ! Cheers, Valerian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67798#67798 ___ 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] Best way to cull object hidden by a mountain
Ok OcclusionQueryNode works fine for me now, this post helped me : http://forum.openscenegraph.org/viewtopic.php?t=8955=occlusionquerynode It seems this problem is still real : an empty OcclusionQueryNode occludes everythings ! Can anyone explain me why ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67800#67800 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Best way to cull object hidden by a mountain
Hi Robert, Thanks for your clarification about OccluderNode. I already looked at the osgocclusionquery example. If I'm right, it just need to add an OcclusionQueryNode to contain the node wich have to be occluded by the rest of the scene graph. I wasn't able to make it works so I may need to dig a bit. To be honest, I don't know if I will use OcclusionCulling at all, but I want to understand how it works and how it can be used. I don't want to be forced to, in a few month, rebuild all my app because I'm unable to use occlusion culling while really needing it. I'm also need to support a part of SLD (see here http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/lines.html), the "Line With Border" example. I want to use PolygonOffset to force the drawing order of my lines, and OcclusionCulling might be a good way to avoid depth buffer issues. Anyway, thanks again for your help. And if you have any tips about OcclusionQueryNode I'll take it ! Cheers, Valerian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67798#67798 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Realtime Pointpicking
Hi, I have a Pickhandler and a dynamically changing scene which consists only of a geometry node. To be more specific, the geometry node represents a point cloud consisting over ~10 vertices. Using a line intersector makes it nearly impossible to get an intersection, but the Intersector I am using, the polytopeintersector, needs ~200ms to get an intersection, which is too long for my application. I need a 'smooth' visualization of ~20-25fps and this would be definitley a bottleneck. Is there a more simple way to get intersections of a non-solid object fast? Here is my PickHandler. Input arguments in my application are the normalized (x,y)coordinates from the GUIEventAdapter, buffer is the tolerance with 0.005 and the viewer casted from the ActionAdapter. Code: bool PickHandler::getPickedPoint(double x, double y, float buffer, osgViewer::View* viewer) { osg::ref_ptr intersector(0); try { intersector = new osgUtil::PolytopeIntersector( osgUtil::Intersector::PROJECTION, x - buffer, y - buffer, x + buffer, y + buffer); } catch (const std::bad_alloc&) { return false; } // DimZero = check only for points intersector->setDimensionMask(osgUtil::PolytopeIntersector::DimZero); intersector->setIntersectionLimit(osgUtil::Intersector::LIMIT_NEAREST); osgUtil::IntersectionVisitor iv(intersector); viewer->getCamera()->accept(iv); if (intersector->containsIntersections()) { osgUtil::PolytopeIntersector::Intersection intersection = *(intersector->getIntersections().begin()); const osg::Vec3f& p = intersection.intersectionPoints[0]; m_point.set(p[0], p[1], p[2]); return true; } return false; Thank you! Cheers, Daniel[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67797#67797 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Best way to cull object hidden by a mountain
HI Valerian, The osg::OccluderNode is not appropriate for what you are trying to achieve, it only works when you have convex planar occluder geometries that you can use to do the culling. It's useful for town or building scenes where walls can form large occluders relative to screen space. A terrain height field doesn't exhibit any proporties that fit with being a convex planar occluder so it not useful in your case. Using OpenGL occlusion query feature via the osg::OcclusionQueryNode is more likely be to be helpful as it can handle a straight meshes rather than contrained geometric primitives like osg::OccluderNode. Have a look at the osgocclusionquery example to see how to set it up. As a general point, do you really need to cull things behind the terrain? If you are getting a solid 60Hz you don't need to complicate your scene graph with techniques like occlusion query. Robert. On 24 June 2016 at 13:39, Valerian Merklingwrote: > I might show some pieces but there is a lot of code and i'm not allowed to > share it :( > > Right now I need to understand how occlusion culling is supposed to be used > with HeightField (is it is possible). I made a few tests in my code but I did > not keep them as nothing was working. > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=67787#67787 > > > > > > ___ > 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] osgQt Coverity Scan reported issue, Qt experts please chip in.
Hello Robert, On Fri, Jun 24, 2016 at 12:13 PM, Robert Osfieldwrote: > Hi All, > > The Coverity Scan has picked up what it thinks is a defect in > QGraphicsViewAdapter: > > > https://scan9.coverity.com/reports.htm#v25753/p12834/fileInstanceId=5614557=1105702=124679 > > I've looked at the relevant code, copy and pasted below for reference. > The issue looks to be related to mixing an int key value with the > enum's defined in osgGA::GUIEventAdapter. I presume the key value is > coming in from a Qt event, though I'm not 100% clear on this as I'm > not the author of this code, no have Qt expertise. > > It would really helpful for those with some Qt expertise to dive in > and review the code and the Coverity Scan defect to see what the > resolution should be. > Could you, please, post the report from Coverity? The link above demands login from me. I have done quite a bit of Qt development, so I can check what the deal is. Regards, J. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Best way to cull object hidden by a mountain
I might show some pieces but there is a lot of code and i'm not allowed to share it :( Right now I need to understand how occlusion culling is supposed to be used with HeightField (is it is possible). I made a few tests in my code but I did not keep them as nothing was working. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67787#67787 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Pass an osg::Texture2D to CUDA driver api
Hi Robert, thanks for the input! When thinking about this, I really want to find another approach than the "main loop" because I need to execute the CUDA code at a very specific point in time. (After a RTT Camera Texture has been written, but prior to rendering another texture). Therefore, I think I cannot use a camera postDrawCallback, because that doesnt solve the problem of displaying the CUDA output after it has been produced in the same frame. My idea was to create a "fake" drawable node and use a DrawCallback together with renderBins to make my custom CUDA code execute at a very specific time during rendering traversal. However, I'm having trouble getting that approach to work. If I create a very simple scene graph, only consisting of a root node and 10 of my custom drawable nodes attached to it, each with another render bin number, the execution order of my drawCallbacks does not follow the renderbin number. Instead, the drawCallbacks always execute in the same order that I have added the drawables to the root node. Does anyone know why that happens? From my understanding, the renderbin number should determine the order of draw (and therefore also of the drawCallback?) operations. robertosfield wrote: > Hi Philipp > > On 15 June 2016 at 14:48, Philipp Meyer <> wrote: > > > figured it out. > > One needs to use > > > > > > Code: > > viewer->setReleaseContextAtEndOfFrameHint(false); > > > > > > > > to prevent the context from getting released after a frame is rendered. > > That way, its resources, like textures, can still be accessed after the > > frame completes. > > > > I don't have CUDA experience so can't comment on this specifically. > > On the OSG side the setReleaseContextAtEndOfFrameHint() is only useful > in when you have a single graphics context and are running your > application SingleThreaded. > > There will be other ways to integrate CUDA rather than via the main > loop. You should be able to create a custom GraphicsOperation and > attach this to a GraphicsWidnow or Camera draw callback to invoke the > CUDA side from within a thread that has the graphics context current. > > Robert. > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67782#67782 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Near/Far problem using models with bones.
Hi, Yes, it works! Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67780#67780 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Near/Far problem using models with bones.
Hi, Nice! I'll try as soon as possible! Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=6#6 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgQt Coverity Scan reported issue, Qt experts please chip in.
Hi All, The Coverity Scan has picked up what it thinks is a defect in QGraphicsViewAdapter: https://scan9.coverity.com/reports.htm#v25753/p12834/fileInstanceId=5614557=1105702=124679 I've looked at the relevant code, copy and pasted below for reference. The issue looks to be related to mixing an int key value with the enum's defined in osgGA::GUIEventAdapter. I presume the key value is coming in from a Qt event, though I'm not 100% clear on this as I'm not the author of this code, no have Qt expertise. It would really helpful for those with some Qt expertise to dive in and review the code and the Coverity Scan defect to see what the resolution should be. If we can fix this defect then osgQt will be "defect" free as far as Coverity Scan is concerned :-) Robert. -- problem src/osgQt/QGraphicsViewAdapter.cpp method: bool QGraphicsViewAdapter::handleKeyEvent(int key, bool keyDown) { QEvent::Type eventType = keyDown ? QEvent::KeyPress : QEvent::KeyRelease; OSG_INFO<<"sendKeyEvent("<second; } else { qtkey = (Qt::Key)key; input = QChar(key); } QKeyEvent event(eventType, qtkey, _qtKeyModifiers, input); QCoreApplication::sendEvent(_graphicsScene.data(), ); return true; } ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Near/Far problem using models with bones.
I found the bug in RigGeometry Will make a patch again master git soon Paradox wrote: > Hi, > > As I said in first post, I have experience with scale problem...if a model is > modeled with scale 10 (for example...) with bones in scale 10 and then > rescaled at 1, this near/far problem is a lot visible! This happens with all > sw I have tried like 3ds, blender, c4d. If I build the model in scale 1 at > beginning and bones in scale 1 also, this problem doesn't go away as you can > see, but isn t so visible > > We have to understand where is this scale problem... > > Thank you! > > Cheers, > Dario [/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67775#67775 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using InfinitePlane
Oh ... Ok. Then I'll do the math ! Thanks a lot ! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67773#67773 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using InfinitePlane
HI Valerian, On 24 June 2016 at 09:01, Valerian Merklingwrote: > InfinitePlane is an osg class, defined in osg/Shape. Oh, that old class. Once written, forever forgotten... Written back in 2002 It's original intention was to support collision detection/pyhsics engines as were the rest of the osg::Shape classes. In the end though they've never ended up being used for this. Only a few of the osg::Shape classes have been actively usd, primarily just for quick and easy visualization of spheres and boxes. even that hasn't been a recommended path though as they don't offer good performance. > According to osg documentation, InfinitePlane cannot be rendered but is used > to support collision detection, so I guess I can use it to compute > intersection between mouse clic and an imaginary ground. It's probably time I removed that docs, suggestion this. There isn't an support in the osgUtil intersectors for this. > I'm working on a GIS app, rendering large raster image with elevation, and I > need to : > - get the x,y,z coordinate of the point under the mouse when I clic on a 3D > rendered tile (and it already work) > - get the x,y,z=0 coordinate of the point under the mouse when I clic > everywhere else, like far away from the rendered scene. And that's where I'm > stuck. I'd just compute the position given the ray in world coordinates and a ground plane. The maths is pretty simple. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using InfinitePlane
Hi, InfinitePlane is an osg class, defined in osg/Shape. According to osg documentation, InfinitePlane cannot be rendered but is used to support collision detection, so I guess I can use it to compute intersection between mouse clic and an imaginary ground. I'm working on a GIS app, rendering large raster image with elevation, and I need to : - get the x,y,z coordinate of the point under the mouse when I clic on a 3D rendered tile (and it already work) - get the x,y,z=0 coordinate of the point under the mouse when I clic everywhere else, like far away from the rendered scene. And that's where I'm stuck. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67771#67771 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Near/Far problem using models with bones.
Hi, As I said in first post, I have experience with scale problem...if a model is modeled with scale 10 (for example...) with bones in scale 10 and then rescaled at 1, this near/far problem is a lot visible! This happens with all sw I have tried like 3ds, blender, c4d. If I build the model in scale 1 at beginning and bones in scale 1 also, this problem doesn't go away as you can see, but isn t so visible We have to understand where is this scale problem... Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67770#67770 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org