PhysicsObject.cpp 671 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (C) 2009-2021, 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. getAllocator().deleteInstance(pair);
  20. }
  21. }
  22. }
  23. HeapAllocator<U8> PhysicsObject::getAllocator() const
  24. {
  25. return m_world->getAllocator();
  26. }
  27. } // end namespace anki