Isis 3 Developer 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.
Definition: BulletTargetShape.cpp:158
static BulletTargetShape * loadPC(const QString &dem, const Pvl *conf=0)
Load a point cloud type DEM in Bullet.
Definition: BulletTargetShape.cpp:122
virtual ~BulletTargetShape()
Desctructor.
Definition: BulletTargetShape.cpp:64
btCollisionObject * body() const
Return a pointer to the Bullet target object/shape.
Definition: BulletTargetShape.cpp:167
static BulletTargetShape * load(const QString &dem, const Pvl *conf=0)
Load a DEM file into the target shape.
Definition: BulletTargetShape.cpp:101
static BulletTargetShape * loadDSK(const QString &dem, const Pvl *conf=0)
Load a DSK in Bullet.
Definition: BulletTargetShape.cpp:134
void setMaximumDistance()
Calculate and save the maximum distance across the body.
Definition: BulletTargetShape.cpp:71
void setTargetBody(btCollisionObject *body)
Set the Bullet shape object to this object instance.
Definition: BulletTargetShape.cpp:173
static BulletTargetShape * loadCube(const QString &dem, const Pvl *conf=0)
Load an ISIS cube type DEM in Bullet.
Definition: BulletTargetShape.cpp:147
Container for cube-like labels.
Definition: Pvl.h:135
QString name() const
Return name of the target shape.
Definition: BulletTargetShape.cpp:88
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
BulletTargetShape()
Default empty constructor.
Definition: BulletTargetShape.cpp:45
btScalar maximumDistance() const
Definition: BulletTargetShape.cpp:180
Bullet Target Shape for planetary bodies.
Definition: BulletTargetShape.h:49