Common.cpp 497 B

123456789101112131415161718192021222324
  1. // Copyright (C) 2009-2020, 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. {
  10. void PhysicsPtrDeleter::operator()(PhysicsObject* ptr)
  11. {
  12. if(ptr == nullptr)
  13. {
  14. return;
  15. }
  16. PhysicsWorld& world = ptr->getWorld();
  17. world.destroyObject(ptr);
  18. }
  19. } // end namespace anki