| 288 | } |
| 289 | |
| 290 | bool NpAggregate::removeArticulationAndReinsert(PxArticulationBase& art, bool reinsert) |
| 291 | { |
| 292 | bool found = false; |
| 293 | PxU32 idx = 0; |
| 294 | while(idx < mNbActors) |
| 295 | { |
| 296 | if ((mActors[idx]->getType() == PxActorType::eARTICULATION_LINK) && (&static_cast<NpArticulationLink*>(mActors[idx])->getRoot() == &art)) |
| 297 | { |
| 298 | PxActor* a = mActors[idx]; |
| 299 | mActors[idx] = mActors[--mNbActors]; |
| 300 | removeAndReinsert(*a, reinsert); |
| 301 | found = true; |
| 302 | } |
| 303 | else |
| 304 | idx++; |
| 305 | } |
| 306 | |
| 307 | reinterpret_cast<PxArticulationImpl*>(art.getImpl())->setAggregate(NULL); |
| 308 | |
| 309 | if (!found) |
| 310 | Ps::getFoundation().error(PxErrorCode::eDEBUG_WARNING, __FILE__, __LINE__, "PxAggregate: can't remove articulation, articulation doesn't belong to aggregate"); |
| 311 | return found; |
| 312 | } |
| 313 | |
| 314 | bool NpAggregate::removeArticulation(PxArticulationBase& art) |
| 315 | { |
no test coverage detected