More work on the bullet wrapper.
[fail.git] / src / bullet / collision / World.h
blobd98f49374c1b2e394972bc16478afc7a475a6242
1 /*
2 Fail game engine
3 Copyright 2007-2009 Antoine Chavasse <a.chavasse@gmail.com>
5 This file is part of Fail.
7 Fail is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3
9 as published by the Free Software Foundation.
11 Fail is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef FAIL_BULLET_COLLISION_WORLD_H_
20 #define FAIL_BULLET_COLLISION_WORLD_H_
22 #include "core/core.h"
23 #include "bullet/collision/bullet-collision_export.h"
24 #include <btBulletCollisionCommon.h>
26 namespace fail { namespace bullet { namespace collision
28 class Object;
29 class Broadphase;
31 class FLBULLET_COLLISION_EXPORT World : public enable_shared_from_this< World >
33 public:
34 World( shared_ptr< Broadphase > pBroadphase );
35 void addObject( shared_ptr< Object > pObject );
37 private:
38 template< class C, typename T > friend struct fail::attribute_traits;
39 friend class Object;
41 void addToDirtyList( shared_ptr< Object > pObj );
42 void updateObjectPositions();
44 shared_ptr< Broadphase > m_pBroadphase;
45 ::btDefaultCollisionConfiguration m_CollisionConfiguration;
46 ::btCollisionDispatcher m_Dispatcher;
47 shared_ptr< ::btCollisionWorld > m_pbtColWorld;
48 std::list< shared_ptr< Object > > m_DirtyObjects;
50 //float m_Radius;
52 }}}
54 #endif