PhysicsObject.cpp 671 B

1234567891011121314151617181920212223242526272829303132333435
  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. {
  9. PhysicsFilteredObject::~PhysicsFilteredObject()
  10. {
  11. for(PhysicsTriggerFilteredPair* pair : m_triggerFilteredPairs)
  12. {
  13. if(pair == nullptr)
  14. {
  15. continue;
  16. }
  17. pair->m_filteredObject = nullptr;
  18. if(pair->shouldDelete())
  19. {
  20. getAllocator().deleteInstance(pair);
  21. }
  22. }
  23. }
  24. HeapAllocator<U8> PhysicsObject::getAllocator() const
  25. {
  26. return m_world->getAllocator();
  27. }
  28. } // end namespace anki