Common.cpp 497 B

1234567891011121314151617181920212223
  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/Common.h>
  6. #include <AnKi/Physics/PhysicsObject.h>
  7. #include <AnKi/Physics/PhysicsWorld.h>
  8. namespace anki {
  9. void PhysicsPtrDeleter::operator()(PhysicsObject* ptr)
  10. {
  11. if(ptr == nullptr)
  12. {
  13. return;
  14. }
  15. PhysicsWorld& world = ptr->getWorld();
  16. world.destroyObject(ptr);
  17. }
  18. } // end namespace anki