PhysicsObject.cpp 602 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <AnKi/Physics/PhysicsObject.h>
  6. #include <AnKi/Physics/PhysicsWorld.h>
  7. namespace anki {
  8. PhysicsFilteredObject::~PhysicsFilteredObject()
  9. {
  10. for(PhysicsTriggerFilteredPair* pair : m_triggerFilteredPairs)
  11. {
  12. if(pair == nullptr)
  13. {
  14. continue;
  15. }
  16. pair->m_filteredObject = nullptr;
  17. if(pair->shouldDelete())
  18. {
  19. deleteInstance(PhysicsMemoryPool::getSingleton(), pair);
  20. }
  21. }
  22. }
  23. } // end namespace anki