| | 579 | PhysicsZone::destroyPhysicsActor(wpPhysicsActor_type _wpPhysicsActor) |
| | 580 | { |
| | 581 | // TODO - remove appropriate entry from m_zoneSet |
| | 582 | //m_zoneSet.erase(iter); |
| | 583 | |
| | 584 | /// Fire the PhysicsZone's onDestroyEvent |
| | 585 | _wpPhysicsActor->onDestroyEvent(_wpPhysicsActor); |
| | 586 | |
| | 587 | /// delete the PhysicsZone pointer |
| | 588 | PhysicsActor* pPhysicsActor = dynamic_cast<PhysicsActor*>(_wpPhysicsActor.get()); |
| | 589 | |
| | 590 | if (pPhysicsActor) |
| | 591 | { |
| | 592 | delete pPhysicsActor; |
| | 593 | } |
| | 594 | else |
| | 595 | { |
| | 596 | throw Zen::Utility::runtime_exception("Zen::ZBullet::PhysicsZone::destroyPhysicsActor() : _wpPhysicsActor is an invalid PhysicsActor."); |
| | 597 | } |
| | 598 | } |
| | 599 | //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ |
| | 600 | void |