Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

48 řádky
1.7 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
  5. // (c) 2009-2013 Benjamin "Touky" Huet <huet.benjamin@gmail.com>
  6. // This program is free software; you can redistribute it and/or
  7. // modify it under the terms of the Do What The Fuck You Want To
  8. // Public License, Version 2, as published by Sam Hocevar. See
  9. // http://www.wtfpl.net/ for more details.
  10. //
  11. #pragma once
  12. //
  13. // Bullet Physics integration in Lol
  14. // ------------------
  15. //
  16. namespace lol
  17. {
  18. //Override Gamegroups names for Physic-usage
  19. //"_ENT_" means that this is a group for Entities that use EasyPhysic primitives.
  20. //"_EZP_" means that this is a group for EasyPhysic primitives.
  21. #define GAMEGROUP_ENT_INPUT GAMEGROUP_BEFORE
  22. #define GAMEGROUP_ENT_PLATFORM GAMEGROUP_DEFAULT
  23. #define GAMEGROUP_ENT_MAIN GAMEGROUP_AFTER
  24. #define GAMEGROUP_EZP_CHAR_CTRLR GAMEGROUP_AFTER_0
  25. #define GAMEGROUP_SIMULATION GAMEGROUP_AFTER_1
  26. #define LOL2BT_UNIT 1.0f
  27. #define BT2LOL_UNIT 1.0f
  28. #define LOL2BT_SIZE 0.5f
  29. #define BT2LOL_SIZE 2.0f
  30. #define LOL2BT_VEC3(ELEMENT) btVector3((ELEMENT).x, (ELEMENT).y, (ELEMENT).z)
  31. #define BT2LOL_VEC3(ELEMENT) (*(lol::vec3*)(&(ELEMENT)))
  32. //Same as above with Unit taken into account
  33. #define LOL2BTU_VEC3(ELEMENT) btVector3((ELEMENT).x * LOL2BT_UNIT, (ELEMENT).y * LOL2BT_UNIT, (ELEMENT).z * LOL2BT_UNIT)
  34. #define BT2LOLU_VEC3(ELEMENT) (*(lol::vec3*)(&(ELEMENT))) * BT2LOL_UNIT
  35. #define LOL2BT_QUAT(ELEMENT) btQuaternion((ELEMENT).x, (ELEMENT).y, (ELEMENT).z, (ELEMENT).w)
  36. #define BT2LOL_QUAT(ELEMENT) lol::quat((ELEMENT).getW(), BT2LOL_VEC3((ELEMENT).getAxis())
  37. } /* namespace lol */