25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

47 lines
1.0 KiB

  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. EasyMesh m_ground_mesh;
  22. EasyMesh m_rigid_mesh[6];
  23. //Bullet Physics Datas
  24. enum
  25. {
  26. USE_CCD=1,
  27. USE_NO_CCD
  28. };
  29. int m_bt_ccd_mode;
  30. btDefaultCollisionConfiguration* m_bt_collision_config;
  31. btCollisionDispatcher* m_bt_dispatcher;
  32. btDbvtBroadphase* m_bt_broadphase;
  33. btSequentialImpulseConstraintSolver* m_bt_solver;
  34. btDiscreteDynamicsWorld* m_bt_world;
  35. Array<btCollisionShape*> m_bt_collision_shapes;
  36. Array<btCollisionShape*> m_bt_dynamic_shapes;
  37. };
  38. #endif // __BTPHYSTEST_H__