Last change
on this file since 1591 was
1591,
checked in by touky, 10 years ago
|
Behold the power of LolPhysics !
Added lol::phys::Simulation, lol::phys::EasyPhysics for easy physic uses.
Added PhysicsObject, wich hold EasyMesh & EasyPhysics components so it is easy to use. Easy seems to be the consensus.
BtPhysTest now works with new physics classes.
Known problem for this commit:
Physics is not properly setup.
There might be memory leaks, I don't think I've parsed all new/delete.
A LOT of primitives are not taken into account.
|
File size:
993 bytes
|
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 | |
---|
20 | namespace lol |
---|
21 | { |
---|
22 | |
---|
23 | #define LOL2BT_UNIT 1.0f |
---|
24 | #define BT2LOL_UNIT 1.0f |
---|
25 | |
---|
26 | #define LOL2BT_SIZE 0.5f |
---|
27 | #define BT2LOL_SIZE 2.0f |
---|
28 | |
---|
29 | #define LOL2BT_VEC3(ELEMENT) (*(btVector3*)(&(ELEMENT))) |
---|
30 | #define BT2LOL_VEC3(ELEMENT) (*(lol::vec3*)(&(ELEMENT))) |
---|
31 | |
---|
32 | #define LOL2BT_QUAT(ELEMENT) (*(btQuaternion*)(&(ELEMENT))) |
---|
33 | #define BT2LOL_QUAT(ELEMENT) (*(lol::quat*)(&(ELEMENT))) |
---|
34 | |
---|
35 | } /* namespace lol */ |
---|
36 | |
---|
37 | #endif /* __LOLBTPHYSICSINTEGRATION_H__ */ |
---|
38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.