[osg-users] what's wrong with removechild

2015-07-24 Thread LUO Jianguo
Hi, I want to pick one node using mouse. then the node deleted. but I failed. I don't know why. the nodepick.h attached. the osg::Node* pNode can be picked. and it can be changed to red. but the following mViewer->getSceneData()->asGroup()->removeChild(pNode); failed. I also used m_Rt->remov

[osg-users] How can I delete skybox from the memory totally

2015-07-24 Thread LUO Jianguo
Hi, I am studying how to delete node from root recentlly. I am so puzzled. I create a skybox node, then add to root. then i create a button, click it to create skybox. click again to delete ckybox. click again and again, create, delete. //not show skybox if(!pDoc->m_cSky.m_bShow)

[osg-users] How to delete Node from the root

2015-07-24 Thread LUO Jianguo
Hi, I use addchild to create root tree. Yeah, we can use removechild to pruning. But the removed node is still in the memory. I wonder how i can delete it totally from the memory. We can get any node using computeIntersections(x,y,intersections). We got the osg::Node *node, then free(node), the n

Re: [osg-users] I created 10000 cylinder, osg run very slow

2015-07-24 Thread LUO Jianguo
Yeah, it's not ladder. It's cable tray in the power plant. . In fact, I used not more than 1000 cylinders, osg runs very slow. I ignore the cylinders, it gets much faster. then I have to disable shadow, osg::ref_ptr ssm = new osgShadow::SoftShadowMap; // float bias = ssm->getBias(); //

[osg-users] I created 10000 cylinder, osg run very slow

2015-07-21 Thread LUO Jianguo
Hi, I need to use cylinder to simulate the “ladder”. So there are many cylinder to create. I new a osg::Geode , and then use it to new 1 osg::MatrixTransform, all these osg::MatrixTransform were added to one group. But the program runs very very slow. In fact I create the same scene using