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.
 
 
 

43 regels
1.1 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
  5. // (c) 2009-2012 Benjamin 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://sam.zoy.org/projects/COPYING.WTFPL for more details.
  10. //
  11. //
  12. // Bullet Physics integration in Lol
  13. // ------------------
  14. //
  15. #if !defined __LOLBTPHYSICSINTEGRATION_H__
  16. #define __LOLBTPHYSICSINTEGRATION_H__
  17. namespace lol
  18. {
  19. #ifdef HAVE_PHYS_USE_BULLET
  20. #define LOL2BT_UNIT 1.0f
  21. #define BT2LOL_UNIT 1.0f
  22. #define LOL2BT_SIZE 0.5f
  23. #define BT2LOL_SIZE 2.0f
  24. #define LOL2BT_VEC3(ELEMENT) btVector3((ELEMENT).x, (ELEMENT).y, (ELEMENT).z)
  25. #define BT2LOL_VEC3(ELEMENT) (*(lol::vec3*)(&(ELEMENT)))
  26. #define LOL2BT_QUAT(ELEMENT) btQuaternion((ELEMENT).x, (ELEMENT).y, (ELEMENT).z, (ELEMENT).w)
  27. #define BT2LOL_QUAT(ELEMENT) lol::quat((ELEMENT).getW(), BT2LOL_VEC3((ELEMENT).getAxis())
  28. #endif // HAVE_PHYS_USE_BULLET
  29. } /* namespace lol */
  30. #endif /* __LOLBTPHYSICSINTEGRATION_H__ */