Bullet Target Shape for planetary bodies. More...
#include <BulletTargetShape.h>


Public Member Functions | |
| BulletTargetShape () | |
| Default empty constructor. | |
| BulletTargetShape (btCollisionObject *btbody, const QString &name="") | |
| Constructs a BulletTargetShape for a given a Bullet object. | |
| virtual | ~BulletTargetShape () |
| Desctructor. | |
| QString | name () const |
| Return name of the target shape. | |
| void | writeBullet (const QString &btName) const |
| Write a serialized version of the target shape to a Bullet file. | |
| btCollisionObject * | body () const |
| Return a pointer to the Bullet target object/shape. | |
| btScalar | maximumDistance () const |
Static Public Member Functions | |
| static BulletTargetShape * | load (const QString &dem, const Pvl *conf=0) |
| Load a DEM file into the target shape. | |
| static BulletTargetShape * | loadPC (const QString &dem, const Pvl *conf=0) |
| Load a point cloud type DEM in Bullet. | |
| static BulletTargetShape * | loadDSK (const QString &dem, const Pvl *conf=0) |
| Load a DSK in Bullet. | |
| static BulletTargetShape * | loadCube (const QString &dem, const Pvl *conf=0) |
| Load an ISIS cube type DEM in Bullet. | |
Protected Member Functions | |
| void | setTargetBody (btCollisionObject *body) |
| Set the Bullet shape object to this object instance. | |
| void | setMaximumDistance () |
| Calculate and save the maximum distance across the body. | |
Static Protected Member Functions | |
| static void | btDelete (btCollisionObject *btbody) |
Private Attributes | |
| QString | m_name |
| std::shared_ptr< btCollisionObject > | m_btbody |
| ! | |
| btScalar | m_maximumDistance |
| ! | |
Bullet Target Shape for planetary bodies.
This class contains the in memory representation of a body for use with the Bullet library. For each type of file that can be used to create a bullet target body, this class should be extended to manage that type of file.
Note this object takes ownership of the btCollisionObject parameter as well as the underlying btCollisionShape pointer (which is also deleted when the object body pointer is deleted.)
Definition at line 37 of file BulletTargetShape.h.
| Isis::BulletTargetShape::BulletTargetShape | ( | ) |
Default empty constructor.
The filename defaults to an empty string and the maximum distance defaults to 0.
Definition at line 28 of file BulletTargetShape.cpp.
References m_maximumDistance.
Referenced by load(), loadCube(), loadDSK(), and loadPC().
| Isis::BulletTargetShape::BulletTargetShape | ( | btCollisionObject * | btbody, |
| const QString & | name = "" ) |
Constructs a BulletTargetShape for a given a Bullet object.
| btbody | The Bullet collision object to contain. |
| name | The name of the object. |
Definition at line 38 of file BulletTargetShape.cpp.
References m_btbody, name(), and setMaximumDistance().
|
virtual |
Desctructor.
Definition at line 48 of file BulletTargetShape.cpp.
| btCollisionObject * Isis::BulletTargetShape::body | ( | ) | const |
Return a pointer to the Bullet target object/shape.
Definition at line 151 of file BulletTargetShape.cpp.
References m_btbody.
Referenced by Isis::BulletWorldManager::addTarget(), and setTargetBody().
|
staticprotected |
Definition at line 168 of file BulletTargetShape.cpp.
|
static |
Load a DEM file into the target shape.
| dem | The DEM file to load. |
| conf | PVL config for the DEM load. Currently unused. |
Definition at line 85 of file BulletTargetShape.cpp.
References BulletTargetShape(), loadCube(), loadDSK(), and loadPC().
Referenced by Isis::BulletShapeModel::BulletShapeModel(), and Isis::ShapeModelFactory::create().
|
static |
Load an ISIS cube type DEM in Bullet.
| dem | The DEM file to load. |
| conf | PVL config for the DEM load. Currently unused. |
Definition at line 131 of file BulletTargetShape.cpp.
References BulletTargetShape().
Referenced by load().
|
static |
Load a DSK in Bullet.
| dem | The DEM file to load. |
| conf | PVL config for the DEM load. Currently unused. |
Definition at line 118 of file BulletTargetShape.cpp.
References BulletTargetShape().
Referenced by load().
|
static |
Load a point cloud type DEM in Bullet.
| dem | The DEM file to load. |
| conf | PVL config for the DEM load. Currently unused. |
Definition at line 106 of file BulletTargetShape.cpp.
References BulletTargetShape().
Referenced by load().
| btScalar Isis::BulletTargetShape::maximumDistance | ( | ) | const |
Definition at line 164 of file BulletTargetShape.cpp.
| QString Isis::BulletTargetShape::name | ( | ) | const |
Return name of the target shape.
Definition at line 72 of file BulletTargetShape.cpp.
Referenced by Isis::BulletShapeModel::BulletShapeModel(), BulletTargetShape(), and Isis::BulletWorldManager::getTarget().
|
protected |
Calculate and save the maximum distance across the body.
This is calculated as the distance from the x, y, z minimum to x, y, z maximum.
Definition at line 55 of file BulletTargetShape.cpp.
References m_btbody, and m_maximumDistance.
Referenced by Isis::BulletDskShape::BulletDskShape(), BulletTargetShape(), and setTargetBody().
|
protected |
Set the Bullet shape object to this object instance.
Definition at line 157 of file BulletTargetShape.cpp.
References body(), m_btbody, and setMaximumDistance().
Referenced by Isis::BulletDskShape::loadFromDsk().
| void Isis::BulletTargetShape::writeBullet | ( | const QString & | btName | ) | const |
Write a serialized version of the target shape to a Bullet file.
| btName | The name of the file to write the target shape to. |
Definition at line 142 of file BulletTargetShape.cpp.
|
private |
!
The name of the body
Definition at line 63 of file BulletTargetShape.h.
Referenced by body(), BulletTargetShape(), setMaximumDistance(), and setTargetBody().
|
private |
!
The Bullet collision object for the body
Definition at line 65 of file BulletTargetShape.h.
Referenced by BulletTargetShape(), and setMaximumDistance().
|
private |
Definition at line 62 of file BulletTargetShape.h.