Re: [osg-users] ProxyNode DatabasePager
Hi Pat, The DatabasePager itself doesn't access the ProxyNode, the ProxyNode pushes DatabaseRequests at the DatabasePager. I've done a quick review of the ProxyNode and can't spot anywhere where the ProxyNode:_fileList is accessed outside it's range. Could you create an example dataset that illustrates this problem? Also could you specify which version of the OSG. Robert. On 17 March 2015 at 19:02, Pat W patrick.r.w...@boeing.com wrote: I ran into a problem with the ProxyNode and the DatabasePager such that if there are missing files in the file list; the DatabasePager can access outside the bounds of the filelist, which crashes with checked iterators. I'm not familiar enough with how the DatabasePager works, but in our case, we have a list of 78 files to load into the ProxyNode. Around the middle of the list, there were 6 files that were not valid and would not load. With a debug build, ProxyNode::getDataseRequest indexes outside the bounds of _filenameList (which is called from DatabasePager::addLoadedDataToSceneGraph). -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63143#63143 ___ 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] Display osg objects in an external viewer
Hi Sophie, On 17 March 2015 at 16:31, Sophie Audonneau sophie.audonne...@etu.univ-lorraine.fr wrote: I added viewer.getCamera()-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); but I saw no change. In fact my two scenes seems to be well connected as when I move the camera in OSG viewer and then close the OSG viewer, things in the software's viewer have been displaced. I cannot see how this affects the fact that OSG viewer is on top of the other one ? I'm afraid I can't help here, debugging this type of stuff without any knowledge of your application, data, exactly how you've integrated the OSG is basically impossible. I have provide what general info I can, the rest will have to be up to you. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to convert osg::Node to osg::Matrix Transformation? It is returning NULL
Hi Goutham, The root nodes of subgraphs your load will not typically be a MatrixTransform so a dynamic_castosg::MatrixTransform* of that subgraph will return NULL. Have a look the cessna.osg and cow.osg in a text editor to see what nodes are at the top. Robert. On 17 March 2015 at 17:24, Goutham Mudide mudidegout...@gmail.com wrote: Hi, I am trying to move loaded object dynamically but to do so i need to get matrix 4x4 for that specific object. In below code i loaded cessna and cow models into scene and i want to rotate only cow model?? I am trying this exercise based on driving the Cessna example from Openscenegraph 3.0 BignnersGuide pgno 234. #include osg/MatrixTransform #include osgDB/ReadFile #include osgGA/GUIEventHandler #include osgViewer/Viewer #include osgViewer/ViewerEventHandlers #include osg/io_utils osg::ref_ptrosg::Group root = new osg::Group; class ModelController : public osgGA::GUIEventHandler { public: ModelController( osg::MatrixTransform* node ) : _model(node) {} virtual bool handle( const osgGA::GUIEventAdapter ea, osgGA::GUIActionAdapter aa ); protected: osg::ref_ptrosg::MatrixTransform _model; }; bool ModelController::handle( const osgGA::GUIEventAdapter ea, osgGA::GUIActionAdapter aa ) { if ( !_model ) { std::coutNot MODELstd::endl; return false; } osg::Matrix matrix = _model-getMatrix(); std::coutMATRIX+_model-getMatrix()std::endl; switch ( ea.getEventType() ) { case osgGA::GUIEventAdapter::KEYDOWN: switch ( ea.getKey() ) { case 'a': case 'A': matrix *= osg::Matrix::rotate(-0.1f, osg::Z_AXIS); break; case 'd': case 'D': matrix *= osg::Matrix::rotate(0.1f, osg::Z_AXIS); break; case 'w': case 'W': matrix *= osg::Matrix::rotate(-0.1f, osg::X_AXIS); break; case 's': case 'S': matrix *= osg::Matrix::rotate(0.1f, osg::X_AXIS); break; default: break; } _model-setMatrix( matrix ); break; default: break; } return false; } int main(int argc,char *argv[]) { osg::ref_ptrosg::Node model = osgDB::readNodeFile( cessna.osg); osg::ref_ptrosg::Node model1 = osgDB::readNodeFile( cow.osg); osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform; mt-addChild( model.get() ); mt-addChild(model1.get()); root-addChild( mt.get() ); osg::MatrixTransform *mt1 = dynamic_cast osg::MatrixTransform* (model1.get()); osg::ref_ptrModelController ctrler =new ModelController(mt1); osgViewer::Viewer viewer; viewer.addEventHandler( ctrler.get() ); viewer.getCamera()-setViewMatrixAsLookAt( osg::Vec3(0.0f,-100.0f,0.0f), osg::Vec3(), osg::Z_AXIS ); viewer.setSceneData( root.get() ); viewer.addEventHandler(new osgViewer::WindowSizeHandler); return viewer.run(); } Thank you! Cheers, Goutham -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63139#63139 ___ 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] Display osg objects in an external viewer
Thank you for your help Cheers, Sophie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63148#63148 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Problems compiling OSG 3.2 with QT 5.1
I haven't had a chance to test it out but under Linux cmake is far happier when thing are in their proper place in “/usr/local/ QT5.1.1” than it is when you try to access libraries in a folder in your home directory. By default Qt likes you to compile to your home directory but I like it to be globally accessible and apparently cmake like that too. ___ GuL -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63158#63158 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Qt 5.4 + OSG 3.2.1 + Multithreading
Hi, perhaps the new OpenGL classes (QOpenGLWidget, QOpenGLContext, QtQuick ) in Qt 5.4 are a solution (you have to replace the old QGLWidget), but i don't know if someone tried this with OSG... New in Qt 5.5: - Windows now defaults to the threaded Qt Quick render loop when using desktop OpenGL (opengl32.dll). - QQuickRenderControl supports threaded rendering. Cheers, ElRudi -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63155#63155 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Cylinder/Skydome flicker when using CompositeView
Hi, I've done some more poking around and I've found out a few things. If I disable the cylinder completely by simply not adding the _oceanCylinderMT child to the _oceanTransform group in OceanScene.cpp, then the flashing stops. The flashing occurs over the water. The effect is seemingly random, but the color that is shown seems to be the _aboveWaterFogColor, which is odd because the cylinder uses the _underWaterWaterFogColor. I set the above to pure green and the under to pure red and the color that flashes is green. The problem goes away if I reduce my cylinder/skydome size. My application requires a far viewing distance so I've set the respective sizes to 30,000. When I bump the size back down to 1,900 (as is set in the ocean example), the flashing doesn't occur. However, I'd like the flexibility to set my viewing distance to be much farther than 1,900. Thank you! Cheers, Ben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63162#63162 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to convert osg::Node to osg::Matrix Transformation? It is returning NULL
Hi Sir, Thanks for the reply sir am pleased with this thanks a lot.. sir i had a doubt on how to change position of an object in scene dynamically which doesn't have MatrixTransformation as root.In my case i have loaded a model in to the scene where it generated tree. I pick a particular object dynamically from scene which is one of the children's of MatixTransform,Here my question is can i have way to Move this perticular geode in scene.. Thank you! Cheers, Goutham -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63163#63163 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org