Isis Developer Reference
BulletTargetShape.h
Go to the documentation of this file.
1 #ifndef BulletTargetShape_h
2 #define BulletTargetShape_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <QSharedPointer>
11 #include <QScopedPointer>
12 #include <QString>
13 
14 #include "IsisBullet.h"
16 
17 namespace Isis {
18 
19 
20  class Pvl;
21 
34  public:
36  BulletTargetShape(btCollisionObject *btbody, const QString &name = "");
37  virtual ~BulletTargetShape();
38 
39  QString name() const;
40 
41  // Special constructors
42  static BulletTargetShape *load(const QString &dem, const Pvl *conf = 0);
43  static BulletTargetShape *loadPC(const QString &dem, const Pvl *conf = 0);
44  static BulletTargetShape *loadDSK(const QString &dem, const Pvl *conf = 0);
45  static BulletTargetShape *loadCube(const QString &dem, const Pvl *conf = 0);
46 
47  void writeBullet(const QString &btName) const;
48  btCollisionObject *body() const;
49 
50  btScalar maximumDistance() const;
51 
52  protected:
53  void setTargetBody(btCollisionObject *body);
54  void setMaximumDistance();
55 
56  private:
57  QString m_name;
60  btScalar m_maximumDistance;
64  };
65 
66 } // namespace Isis
67 
68 #endif
69 
Isis::BulletTargetShape::~BulletTargetShape
virtual ~BulletTargetShape()
Desctructor.
Definition: BulletTargetShape.cpp:47
FileName.h
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::BulletTargetShape::writeBullet
void writeBullet(const QString &btName) const
Write a serialized version of the target shape to a Bullet file.
Definition: BulletTargetShape.cpp:141
BulletDskShape.h
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
QSharedPointer< btCollisionObject >
Isis::BulletDskShape
Bullet Target Shape for NAIF type 2 DSK models.
Definition: BulletDskShape.h:26
Isis::BulletTargetShape::setMaximumDistance
void setMaximumDistance()
Calculate and save the maximum distance across the body.
Definition: BulletTargetShape.cpp:54
Isis::BulletTargetShape::load
static BulletTargetShape * load(const QString &dem, const Pvl *conf=0)
Load a DEM file into the target shape.
Definition: BulletTargetShape.cpp:84
Isis::BulletTargetShape::loadDSK
static BulletTargetShape * loadDSK(const QString &dem, const Pvl *conf=0)
Load a DSK in Bullet.
Definition: BulletTargetShape.cpp:117
IString.h
Isis::BulletTargetShape::loadCube
static BulletTargetShape * loadCube(const QString &dem, const Pvl *conf=0)
Load an ISIS cube type DEM in Bullet.
Definition: BulletTargetShape.cpp:130
Isis::BulletTargetShape::setTargetBody
void setTargetBody(btCollisionObject *body)
Set the Bullet shape object to this object instance
Definition: BulletTargetShape.cpp:156
Pvl.h
BulletTargetShape.h
Isis::BulletTargetShape::name
QString name() const
Return name of the target shape.
Definition: BulletTargetShape.cpp:71
BulletClosestRayCallback.h
Isis::FileName::extension
QString extension() const
Returns the last extension of the file name.
Definition: FileName.cpp:178
IException.h
Isis::BulletTargetShape::BulletTargetShape
BulletTargetShape()
Default empty constructor.
Definition: BulletTargetShape.cpp:28
Isis::BulletTargetShape
Bullet Target Shape for planetary bodies.
Definition: BulletTargetShape.h:33
Isis::BulletTargetShape::maximumDistance
btScalar maximumDistance() const
Definition: BulletTargetShape.cpp:163
Isis::BulletTargetShape::loadPC
static BulletTargetShape * loadPC(const QString &dem, const Pvl *conf=0)
Load a point cloud type DEM in Bullet.
Definition: BulletTargetShape.cpp:105
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