|
/*for (int i = 1; i < nSize; i++) {
int j, nTemp = nData[i];
for (j = i; j > 0 && nData[j-1] > nTemp; j--)
nData[j] = nData[j-1];
nData[j] = nTemp;
}*/
int NodeSize = IntersectorNode->getNumChildren();
if(NodeSize < 1)
return;
for(int i = 0; i < NodeSize ; i++)
{
int j;
osg::Node* pTemp = IntersectorNode->getChild(i);
for(j = i ; j > 0 && IntersectorNode->getChild(i-1) > pTemp ;j --)
IntersectorNode->setChild(j,IntersectorNode->getChild(j-1));
IntersectorNode->setChild(j,pTemp);
} |
|