Isis 3 Programmer Reference
BulletTargetShape.h
Go to the documentation of this file.
1 #ifndef BulletTargetShape_h
2 #define BulletTargetShape_h
3 
26 #include <QSharedPointer>
27 #include <QScopedPointer>
28 #include <QString>
29 
30 #include "IsisBullet.h"
32 
33 namespace Isis {
34 
35 
36  class Pvl;
37 
50  public:
52  BulletTargetShape(btCollisionObject *btbody, const QString &name = "");
53  virtual ~BulletTargetShape();
54 
55  QString name() const;
56 
57  // Special constructors
58  static BulletTargetShape *load(const QString &dem, const Pvl *conf = 0);
59  static BulletTargetShape *loadPC(const QString &dem, const Pvl *conf = 0);
60  static BulletTargetShape *loadDSK(const QString &dem, const Pvl *conf = 0);
61  static BulletTargetShape *loadCube(const QString &dem, const Pvl *conf = 0);
62 
63  void writeBullet(const QString &btName) const;
64  btCollisionObject *body() const;
65 
66  btScalar maximumDistance() const;
67 
68  protected:
69  void setTargetBody(btCollisionObject *body);
70  void setMaximumDistance();
71 
72  private:
73  QString m_name;
76  btScalar m_maximumDistance;
80  };
81 
82 } // namespace Isis
83 
84 #endif
85 
void writeBullet(const QString &btName) const
Write a serialized version of the target shape to a Bullet file.
static BulletTargetShape * loadPC(const QString &dem, const Pvl *conf=0)
Load a point cloud type DEM in Bullet.
virtual ~BulletTargetShape()
Desctructor.
btScalar m_maximumDistance
! The Bullet collision object for the body
btCollisionObject * body() const
Return a pointer to the Bullet target object/shape.
static BulletTargetShape * load(const QString &dem, const Pvl *conf=0)
Load a DEM file into the target shape.
static BulletTargetShape * loadDSK(const QString &dem, const Pvl *conf=0)
Load a DSK in Bullet.
void setMaximumDistance()
Calculate and save the maximum distance across the body.
void setTargetBody(btCollisionObject *body)
Set the Bullet shape object to this object instance.
static BulletTargetShape * loadCube(const QString &dem, const Pvl *conf=0)
Load an ISIS cube type DEM in Bullet.
QSharedPointer< btCollisionObject > m_btbody
! The name of the body
Container for cube-like labels.
Definition: Pvl.h:135
QString name() const
Return name of the target shape.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
BulletTargetShape()
Default empty constructor.
Bullet Target Shape for planetary bodies.