Isis 3 Developer Reference
BulletWorldManager.h
Go to the documentation of this file.
1 #ifndef BulletWorldManager_h
2 #define BulletWorldManager_h
3 
26 #include <QCache>
27 #include <QMutex>
28 #include <QScopedPointer>
29 #include <QString>
30 #include <QtGlobal>
31 
32 #include "IsisBullet.h"
33 #include "BulletTargetShape.h"\
34 
35 namespace Isis {
36 
58  public:
60  BulletWorldManager(const QString &name);
61  virtual ~BulletWorldManager();
62 
63  QString name() const;
64  int size() const;
65 
66  BulletTargetShape *getTarget(const int &index = 0) const;
67  BulletTargetShape *getTarget(const QString &name) const;
68  void addTarget(BulletTargetShape *target);
69 
70  bool raycast( const btVector3 &observer, const btVector3 &lookdir,
71  btCollisionWorld::RayResultCallback &hits ) const;
72 
73  const btCollisionWorld &getWorld() const;
74 
75 
76  private:
77  Q_DISABLE_COPY(BulletWorldManager)
78 
79  QString m_name;
81  QScopedPointer<btDefaultCollisionConfiguration> m_collision;
84  QScopedPointer<btCollisionDispatcher> m_dispatcher;
86  QScopedPointer<btBroadphaseInterface> m_broadphase;
89  QScopedPointer<btCollisionWorld> m_world;
93  mutable QMutex m_mutex;
94 
95  void initWorld();
96 
97  };
98 
99 } // namespace Isis
100 
101 #endif
102 
Bullet World manager maintains a proper state for target bodies.
Definition: BulletWorldManager.h:57
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Bullet Target Shape for planetary bodies.
Definition: BulletTargetShape.h:49