1#ifndef BulletWorldManager_h
2#define BulletWorldManager_h
12#include <QScopedPointer>
54 bool raycast(
const btVector3 &observer,
const btVector3 &lookdir,
55 btCollisionWorld::RayResultCallback &hits )
const;
57 const btCollisionWorld &
getWorld()
const;
65 QScopedPointer<btDefaultCollisionConfiguration> m_collision;
68 QScopedPointer<btCollisionDispatcher> m_dispatcher;
70 QScopedPointer<btBroadphaseInterface> m_broadphase;
73 QScopedPointer<btCollisionWorld> m_world;
77 mutable QMutex m_mutex;
Bullet Target Shape for planetary bodies.
Definition BulletTargetShape.h:33
Bullet World manager maintains a proper state for target bodies.
Definition BulletWorldManager.h:41
bool raycast(const btVector3 &observer, const btVector3 &lookdir, btCollisionWorld::RayResultCallback &hits) const
Perform ray casting from a position and a look direction.
Definition BulletWorldManager.cpp:139
void addTarget(BulletTargetShape *target)
Add a Bullet shape to the collision world.
Definition BulletWorldManager.cpp:113
virtual ~BulletWorldManager()
Destroys the BulletWorldManager.
Definition BulletWorldManager.cpp:48
QString name() const
Name of the world.
Definition BulletWorldManager.cpp:56
BulletTargetShape * getTarget(const int &index=0) const
Return a collision object by index into the world.
Definition BulletWorldManager.cpp:78
const btCollisionWorld & getWorld() const
Get the Collision World where the targets exist.
Definition BulletWorldManager.cpp:151
BulletWorldManager()
Default empty constructor.
Definition BulletWorldManager.cpp:28
int size() const
Number of collision objects in the world.
Definition BulletWorldManager.cpp:66
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16