Isis Developer Reference
BulletWorldManager.h
Go to the documentation of this file.
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 
FileName.h
Isis::BulletWorldManager
Bullet World manager maintains a proper state for target bodies.
Definition: BulletWorldManager.h:41
IString.h
BulletTargetShape.h
Isis::BulletTargetShape::name
QString name() const
Return name of the target shape.
Definition: BulletTargetShape.cpp:71
IException.h
BulletWorldManager.h
std
Namespace for the standard library.
Isis::BulletTargetShape
Bullet Target Shape for planetary bodies.
Definition: BulletTargetShape.h:33
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
IsisBullet.h
Isis::BulletTargetShape::body
btCollisionObject * body() const
Return a pointer to the Bullet target object/shape.
Definition: BulletTargetShape.cpp:150