blender/extern/bullet/Bullet/CollisionDispatch/CollisionWorld.h
Erwin Coumans 90e5a9aa14 Reorganized Bullet physics files, added preliminary vehicle simulation files (disabled).
Requires some changes to projectfiles/makefiles/scons, for the added and removed files!
2006-02-21 05:36:56 +00:00

65 lines
1.4 KiB
C++

/*
* Copyright (c) 2002-2006 Erwin Coumans http://continuousphysics.com/Bullet/
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies.
* Erwin Coumans makes no representations about the suitability
* of this software for any purpose.
* It is provided "as is" without express or implied warranty.
*/
#ifndef COLLISION_WORLD_H
#define COLLISION_WORLD_H
struct CollisionObject;
class CollisionDispatcher;
class BroadphaseInterface;
#include <vector>
///CollisionWorld is interface and container for the collision detection
class CollisionWorld
{
std::vector<CollisionObject*> m_collisionObjects;
CollisionDispatcher* m_dispatcher;
BroadphaseInterface* m_broadphase;
public:
CollisionWorld(CollisionDispatcher* dispatcher,BroadphaseInterface* broadphase)
:m_dispatcher(dispatcher),
m_broadphase(broadphase)
{
}
virtual void UpdateActivationState();
BroadphaseInterface* GetBroadphase()
{
return m_broadphase;
}
CollisionDispatcher* GetDispatcher()
{
return m_dispatcher;
}
int GetNumCollisionObjects() const
{
return m_collisionObjects.size();
}
void AddCollisionObject(CollisionObject* collisionObject);
void RemoveCollisionObject(CollisionObject* collisionObject);
};
#endif //COLLISION_WORLD_H