source: trunk/test/Physics/Include/LolBtPhysicsIntegration.h @ 1747

Last change on this file since 1747 was 1747, checked in by touky, 8 years ago

BtPhysTest : Splitted Physics files

File size: 1.1 KB
Line 
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//
13// Bullet Physics integration in Lol
14// ------------------
15//
16
17#if !defined __LOLBTPHYSICSINTEGRATION_H__
18#define __LOLBTPHYSICSINTEGRATION_H__
19
20namespace lol
21{
22
23#ifdef HAVE_PHYS_USE_BULLET
24
25#define LOL2BT_UNIT                             1.0f
26#define BT2LOL_UNIT                             1.0f
27
28#define LOL2BT_SIZE                             0.5f
29#define BT2LOL_SIZE                             2.0f
30
31#define LOL2BT_VEC3(ELEMENT)    btVector3((ELEMENT).x, (ELEMENT).y, (ELEMENT).z)
32#define BT2LOL_VEC3(ELEMENT)    (*(lol::vec3*)(&(ELEMENT)))
33
34#define LOL2BT_QUAT(ELEMENT)    btQuaternion((ELEMENT).x, (ELEMENT).y, (ELEMENT).z, (ELEMENT).w)
35#define BT2LOL_QUAT(ELEMENT)    lol::quat((ELEMENT).getW(), BT2LOL_VEC3((ELEMENT).getAxis())
36
37#endif // HAVE_PHYS_USE_BULLET
38
39} /* namespace lol */
40
41#endif /* __LOLBTPHYSICSINTEGRATION_H__ */
42
Note: See TracBrowser for help on using the repository browser.