You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // BtPhysTest
  3. //
  4. // Copyright: (c) 2009-2012 Benjamin Huet <huet.benjamin@gmail.com>
  5. // (c) 2012 Sam Hocevar <sam@hocevar.net>
  6. //
  7. #if !defined __BTPHYSTEST_H__
  8. #define __BTPHYSTEST_H__
  9. class BtPhysTest : public WorldEntity
  10. {
  11. public:
  12. BtPhysTest(bool editor = false);
  13. virtual ~BtPhysTest();
  14. char const *GetName() { return "<BtPhysTest>"; }
  15. protected:
  16. virtual void TickGame(float seconds);
  17. virtual void TickDraw(float seconds);
  18. private:
  19. Camera* m_camera;
  20. bool m_ready;
  21. lol::phys::Simulation* m_simulation;
  22. Array<PhysicsObject*> m_physobj_list;
  23. PhysicsObject* m_ground_object;
  24. #if 0
  25. EasyMesh m_ground_mesh;
  26. EasyMesh m_rigid_mesh[6];
  27. //Bullet Physics Datas
  28. enum
  29. {
  30. USE_CCD=1,
  31. USE_NO_CCD
  32. };
  33. int m_bt_ccd_mode;
  34. btDefaultCollisionConfiguration* m_bt_collision_config;
  35. btCollisionDispatcher* m_bt_dispatcher;
  36. btDbvtBroadphase* m_bt_broadphase;
  37. btSequentialImpulseConstraintSolver* m_bt_solver;
  38. btDiscreteDynamicsWorld* m_bt_world;
  39. Array<btCollisionShape*> m_bt_collision_shapes;
  40. Array<btCollisionShape*> m_bt_dynamic_shapes;
  41. #endif
  42. };
  43. #endif // __BTPHYSTEST_H__