Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

78 wiersze
2.1 KiB

  1. //
  2. // BtPhysTest
  3. //
  4. // Copyright: (c) 2009-2013 Benjamin "Touky" 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 CatShaderData : public GpuShaderData
  10. {
  11. friend class CRenderer;
  12. public:
  13. //---
  14. CatShaderData(uint32_t vert_decl_flags, Shader* shader);
  15. //---
  16. void SetupDefaultData();
  17. virtual void SetupShaderDatas(mat4 const &model);
  18. //--
  19. virtual lol::String GetInVertexName() { return lol::String("in_vertex"); }
  20. virtual lol::String GetInNormalName() { return lol::String("in_normal"); }
  21. virtual lol::String GetInColorName() { return lol::String("in_color"); }
  22. virtual lol::String GetInTexCoordName() { return lol::String("in_texcoord"); }
  23. ShaderTexture m_shader_texture;
  24. };
  25. class BtPhysTest : public WorldEntity
  26. {
  27. public:
  28. BtPhysTest(bool editor = false);
  29. virtual ~BtPhysTest();
  30. char const *GetName() { return "<BtPhysTest>"; }
  31. protected:
  32. virtual void TickGame(float seconds);
  33. virtual void TickDraw(float seconds);
  34. private:
  35. enum
  36. {
  37. KEY_MOVE_FORWARD,
  38. KEY_MOVE_BACK,
  39. KEY_MOVE_LEFT,
  40. KEY_MOVE_RIGHT,
  41. KEY_MOVE_UP,
  42. KEY_MOVE_DOWN,
  43. KEY_MOVE_JUMP,
  44. KEY_QUIT,
  45. KEY_MAX,
  46. };
  47. TileSet* m_cat_texture;
  48. Shader* m_cat_shader;
  49. CatShaderData* m_cat_sdata;
  50. Camera* m_camera;
  51. Controller * m_controller;
  52. Light * m_light1;
  53. Light * m_light2;
  54. bool m_ready;
  55. lol::phys::Simulation* m_simulation;
  56. Array<EasyConstraint*> m_constraint_list;
  57. Array<PhysicsObject*, float> m_physobj_list;
  58. Array<PhysicsObject*> m_ground_list;
  59. Array<PhysicsObject*> m_platform_list;
  60. Array<PhysicsObject*> m_character_list;
  61. Array<PhysicsObject*> m_stairs_list;
  62. float m_loop_value;
  63. };
  64. #endif // __BTPHYSTEST_H__