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
31 class FLBULLET_COLLISION_EXPORT World
: public enable_shared_from_this
< World
>
34 World( shared_ptr
< Broadphase
> pBroadphase
);
35 void addObject( shared_ptr
< Object
> pObject
);
38 template< class C
, typename T
> friend struct fail::attribute_traits
;
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
;