I just experienced "Debug Assertion Failed" error when I repeated to add about 100 childs to root node and remove 60 childs from root node.
I don't know the reason. Please help me.
Hi, Mr. Glenn.
I've not fixed this issuer until now. So I attached my code snippet.
I'm simulating power cable on the terrain along time.
Let consider current time as t, past time as t-1, t-2, ..., t-29. So I want to rendering 30 cable shapes according time [t-29, t].
Users can notice cable shape in this time interval via the scene.
I called below "updateCable()" function every 0.5 sec. Then this function will remove the latest cable and add the new cable on the scene. But sometimes I get the vector crash.
How can I fix it?
osg::ref_ptr<osg::MatrixTransform> mt = new osg::MatrixTransform();
mt->setMatrix(osg::Matrixd::translate(getNewCablePos().x, getNewCablePos().y, getNewCablePos().z));
if (_runtimeRoot->getNumChildren()> 30)