| 1165 | } |
| 1166 | |
| 1167 | void b2ParticleSystem::SplitParticleGroup(b2ParticleGroup* group) |
| 1168 | { |
| 1169 | UpdateContacts(true); |
| 1170 | int32 particleCount = group->GetParticleCount(); |
| 1171 | // We create several linked lists. Each list represents a set of connected |
| 1172 | // particles. |
| 1173 | ParticleListNode* nodeBuffer = |
| 1174 | (ParticleListNode*) m_world->m_stackAllocator.Allocate( |
| 1175 | sizeof(ParticleListNode) * particleCount); |
| 1176 | InitializeParticleLists(group, nodeBuffer); |
| 1177 | MergeParticleListsInContact(group, nodeBuffer); |
| 1178 | ParticleListNode* survivingList = |
| 1179 | FindLongestParticleList(group, nodeBuffer); |
| 1180 | MergeZombieParticleListNodes(group, nodeBuffer, survivingList); |
| 1181 | CreateParticleGroupsFromParticleList(group, nodeBuffer, survivingList); |
| 1182 | UpdatePairsAndTriadsWithParticleList(group, nodeBuffer); |
| 1183 | m_world->m_stackAllocator.Free(nodeBuffer); |
| 1184 | } |
| 1185 | |
| 1186 | void b2ParticleSystem::InitializeParticleLists( |
| 1187 | const b2ParticleGroup* group, ParticleListNode* nodeBuffer) |
nothing calls this directly
no test coverage detected