[1995] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * Martin Stypinski |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | #include "OrxonoxStableHeaders.h" |
---|
| 30 | #include "HelloBullet.h" |
---|
| 31 | |
---|
| 32 | #include <OgreStaticGeometry.h> |
---|
| 33 | #include <OgreSceneManager.h> |
---|
| 34 | #include <OgreEntity.h> |
---|
| 35 | |
---|
| 36 | #include "ogreode/OgreOde_Core.h" |
---|
| 37 | #include "ogreode/OgreOdeGeometry.h" |
---|
| 38 | #include "util/Convert.h" |
---|
| 39 | #include "core/CoreIncludes.h" |
---|
| 40 | #include "core/ConfigValueIncludes.h" |
---|
| 41 | #include "core/XMLPort.h" |
---|
| 42 | #include "GraphicsEngine.h" |
---|
| 43 | |
---|
| 44 | namespace orxonox |
---|
| 45 | { |
---|
| 46 | CreateFactory(HelloBullet); |
---|
| 47 | |
---|
| 48 | HelloBullet::HelloBullet() |
---|
| 49 | { |
---|
| 50 | RegisterObject(HelloBullet); |
---|
| 51 | COUT(0) << "HelloBullet loaded" << std::endl ; |
---|
[2047] | 52 | int maxProxies = 1024 |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | btVector3 worldAabbMin(-10000,-10000,-10000); |
---|
| 56 | btVector3 worldAabbMax(10000,10000,10000); |
---|
| 57 | btAxisSweep3* broadphase = new btAxisSweep3(worldAabbMin,worldAabbMax,maxProxies); |
---|
| 58 | |
---|
| 59 | // Set up the collision configuration and dispatcher |
---|
| 60 | btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration(); |
---|
| 61 | btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration); |
---|
| 62 | |
---|
| 63 | // The actual physics solver |
---|
| 64 | btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver; |
---|
| 65 | |
---|
| 66 | // The world. |
---|
| 67 | btDiscreteDynamicsWorld* dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,broadphase,solver,collisionConfiguration); |
---|
[1995] | 68 | } |
---|
| 69 | |
---|
| 70 | HelloBullet::~HelloBullet() |
---|
| 71 | { |
---|
| 72 | // empty |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | void HelloBullet::setConfigValues() |
---|
| 76 | { |
---|
| 77 | |
---|
| 78 | } |
---|
| 79 | |
---|
| 80 | /** |
---|
| 81 | @brief |
---|
| 82 | XML loading and saving. |
---|
| 83 | @param |
---|
| 84 | xmlelement The XML-element |
---|
| 85 | @param |
---|
| 86 | loading Loading (true) or saving (false) |
---|
| 87 | @return |
---|
| 88 | The XML-element |
---|
| 89 | */ |
---|
| 90 | void HelloBullet::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
| 91 | { |
---|
| 92 | SUPER(HelloBullet, XMLPort, xmlelement, mode); |
---|
| 93 | } |
---|
| 94 | |
---|
| 95 | void HelloBullet::tick(float dt) |
---|
| 96 | { |
---|
| 97 | // only update physics in a certain interval |
---|
| 98 | } |
---|
| 99 | |
---|
| 100 | } |
---|