Isis Developer Reference
|
Bullet Target Shape for planetary bodies. More...
#include <BulletTargetShape.h>
Public Member Functions | |
BulletTargetShape () | |
Default empty constructor. More... | |
BulletTargetShape (btCollisionObject *btbody, const QString &name="") | |
Constructs a BulletTargetShape for a given a Bullet object. More... | |
virtual | ~BulletTargetShape () |
Desctructor. More... | |
QString | name () const |
Return name of the target shape. More... | |
void | writeBullet (const QString &btName) const |
Write a serialized version of the target shape to a Bullet file. More... | |
btCollisionObject * | body () const |
Return a pointer to the Bullet target object/shape. More... | |
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. More... | |
static BulletTargetShape * | loadPC (const QString &dem, const Pvl *conf=0) |
Load a point cloud type DEM in Bullet. More... | |
static BulletTargetShape * | loadDSK (const QString &dem, const Pvl *conf=0) |
Load a DSK in Bullet. More... | |
static BulletTargetShape * | loadCube (const QString &dem, const Pvl *conf=0) |
Load an ISIS cube type DEM in Bullet. More... | |
Protected Member Functions | |
void | setTargetBody (btCollisionObject *body) |
Set the Bullet shape object to this object instance More... | |
void | setMaximumDistance () |
Calculate and save the maximum distance across the body. More... | |
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.
Isis::BulletTargetShape::BulletTargetShape | ( | ) |
Default empty constructor.
The filename defaults to an empty string and the maximum distance defaults to 0.
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. |
References setMaximumDistance().
|
virtual |
Desctructor.
btCollisionObject * Isis::BulletTargetShape::body | ( | ) | const |
Return a pointer to the Bullet target object/shape.
Referenced by Isis::BulletWorldManager::addTarget(), and setTargetBody().
|
static |
Load a DEM file into the target shape.
dem | The DEM file to load. |
conf | PVL config for the DEM load. Currently unused. |
References Isis::FileName::extension(), loadCube(), loadDSK(), and loadPC().
Referenced by Isis::BulletShapeModel::BulletShapeModel().
|
static |
Load an ISIS cube type DEM in Bullet.
dem | The DEM file to load. |
conf | PVL config for the DEM load. Currently unused. |
Referenced by load().
|
static |
Load a DSK in Bullet.
dem | The DEM file to load. |
conf | PVL config for the DEM load. Currently unused. |
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. |
Referenced by load().
btScalar Isis::BulletTargetShape::maximumDistance | ( | ) | const |
QString Isis::BulletTargetShape::name | ( | ) | const |
Return name of the target shape.
Referenced by Isis::BulletShapeModel::BulletShapeModel(), 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.
Referenced by Isis::BulletDskShape::BulletDskShape(), BulletTargetShape(), and setTargetBody().
|
protected |
Set the Bullet shape object to this object instance
References body(), and setMaximumDistance().
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. |