PhysicsDrawer.cpp 543 B

12345678910111213141516171819202122
  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/PhysicsDrawer.h>
  6. #include <anki/physics/PhysicsWorld.h>
  7. namespace anki
  8. {
  9. void PhysicsDrawer::drawWorld(const PhysicsWorld& world)
  10. {
  11. auto lock = world.lockBtWorld();
  12. btDynamicsWorld& btWorld = *const_cast<btDynamicsWorld*>(world.getBtWorld());
  13. btWorld.setDebugDrawer(&m_debugDraw);
  14. btWorld.debugDrawWorld();
  15. }
  16. } // end namespace anki