Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis Developer Reference
BulletTargetShape.h
Go to the documentation of this file.
1#ifndef BulletTargetShape_h
2#define BulletTargetShape_h
7
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include <QSharedPointer>
11#include <QScopedPointer>
12#include <QString>
13
14#include "IsisBullet.h"
16
17namespace Isis {
18
19
20 class Pvl;
21
38 public:
40 BulletTargetShape(btCollisionObject *btbody, const QString &name = "");
41 virtual ~BulletTargetShape();
42
43 QString name() const;
44
45 // Special constructors
46 static BulletTargetShape *load(const QString &dem, const Pvl *conf = 0);
47 static BulletTargetShape *loadPC(const QString &dem, const Pvl *conf = 0);
48 static BulletTargetShape *loadDSK(const QString &dem, const Pvl *conf = 0);
49 static BulletTargetShape *loadCube(const QString &dem, const Pvl *conf = 0);
50
51 void writeBullet(const QString &btName) const;
52 btCollisionObject *body() const;
53
54 btScalar maximumDistance() const;
55
56 protected:
57 void setTargetBody(btCollisionObject *body);
58 void setMaximumDistance();
59 static void btDelete( btCollisionObject *btbody ); // shared_ptr destructor cleanup
60
61 private:
62 QString m_name;
63 std::shared_ptr<btCollisionObject> m_btbody;
65 btScalar m_maximumDistance;
68
69
70 };
71
72} // namespace Isis
73
74#endif
75
static BulletTargetShape * loadCube(const QString &dem, const Pvl *conf=0)
Load an ISIS cube type DEM in Bullet.
Definition BulletTargetShape.cpp:131
void setTargetBody(btCollisionObject *body)
Set the Bullet shape object to this object instance.
Definition BulletTargetShape.cpp:157
static BulletTargetShape * loadDSK(const QString &dem, const Pvl *conf=0)
Load a DSK in Bullet.
Definition BulletTargetShape.cpp:118
static void btDelete(btCollisionObject *btbody)
Definition BulletTargetShape.cpp:168
btCollisionObject * body() const
Return a pointer to the Bullet target object/shape.
Definition BulletTargetShape.cpp:151
static BulletTargetShape * loadPC(const QString &dem, const Pvl *conf=0)
Load a point cloud type DEM in Bullet.
Definition BulletTargetShape.cpp:106
void writeBullet(const QString &btName) const
Write a serialized version of the target shape to a Bullet file.
Definition BulletTargetShape.cpp:142
static BulletTargetShape * load(const QString &dem, const Pvl *conf=0)
Load a DEM file into the target shape.
Definition BulletTargetShape.cpp:85
QString name() const
Return name of the target shape.
Definition BulletTargetShape.cpp:72
void setMaximumDistance()
Calculate and save the maximum distance across the body.
Definition BulletTargetShape.cpp:55
BulletTargetShape()
Default empty constructor.
Definition BulletTargetShape.cpp:28
btScalar maximumDistance() const
Definition BulletTargetShape.cpp:164
virtual ~BulletTargetShape()
Desctructor.
Definition BulletTargetShape.cpp:48
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16