Logo Search packages:      
Sourcecode: blender version File versions  Download package

void btUnionFind::sortIslands (  ) 

this is a special operation, destroying the content of btUnionFind. it sorts the elements, based on island id, in order to make it easy to iterate over islands

Definition at line 64 of file btUnionFind.cpp.

References btAlignedObjectArray< T >::quickSort(), and btAlignedObjectArray< T >::size().

Referenced by btSimulationIslandManager::buildIslands().


      //first store the original body index, and islandId
      int numElements = m_elements.size();
      for (int i=0;i<numElements;i++)
            m_elements[i].m_id = find(i);
            m_elements[i].m_sz = i;
       // Sort the vector using predicate and std::sort
        //std::sort(m_elements.begin(), m_elements.end(), btUnionFindElementSortPredicate);


Generated by  Doxygen 1.6.0   Back to index