Isis 3 Programmer Reference
BulletWorldManager.h
1 #ifndef BulletWorldManager_h
2 #define BulletWorldManager_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <QCache>
11 #include <QMutex>
12 #include <QScopedPointer>
13 #include <QString>
14 #include <QtGlobal>
15 
16 #include "IsisBullet.h"
17 #include "BulletTargetShape.h"\
18 
19 namespace Isis {
20 
42  public:
44  BulletWorldManager(const QString &name);
45  virtual ~BulletWorldManager();
46 
47  QString name() const;
48  int size() const;
49 
50  BulletTargetShape *getTarget(const int &index = 0) const;
51  BulletTargetShape *getTarget(const QString &name) const;
52  void addTarget(BulletTargetShape *target);
53 
54  bool raycast( const btVector3 &observer, const btVector3 &lookdir,
55  btCollisionWorld::RayResultCallback &hits ) const;
56 
57  const btCollisionWorld &getWorld() const;
58 
59 
60  private:
61  Q_DISABLE_COPY(BulletWorldManager)
62 
63  QString m_name;
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;
78 
79  void initWorld();
80 
81  };
82 
83 } // namespace Isis
84 
85 #endif
86 
Isis::BulletWorldManager::m_mutex
QMutex m_mutex
! The Bullet collision world that contains the representation of the body.
Definition: BulletWorldManager.h:77
Isis::BulletWorldManager
Bullet World manager maintains a proper state for target bodies.
Definition: BulletWorldManager.h:41
Isis::BulletWorldManager::m_dispatcher
QScopedPointer< btCollisionDispatcher > m_dispatcher
! The collision configuration for the world.
Definition: BulletWorldManager.h:68
Isis::BulletWorldManager::m_world
QScopedPointer< btCollisionWorld > m_world
! The interface for overlaps in the world's aabb acceleration tree.
Definition: BulletWorldManager.h:73
Isis::BulletWorldManager::m_collision
QScopedPointer< btDefaultCollisionConfiguration > m_collision
! The name of the Bullet world.
Definition: BulletWorldManager.h:65
Isis::BulletTargetShape
Bullet Target Shape for planetary bodies.
Definition: BulletTargetShape.h:33
Isis::BulletWorldManager::m_broadphase
QScopedPointer< btBroadphaseInterface > m_broadphase
! The dispatcher for the world.
Definition: BulletWorldManager.h:70
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16