8#include "BulletTargetShape.h"
9#include "BulletDskShape.h"
17#include "IException.h"
40 m_btbody = std::shared_ptr<btCollisionObject> ( btbody, BulletTargetShape::btDelete );
88 QString ext = v_file.extension().toLower();
90 if (
"bds" == ext)
return (
loadDSK(dem) );
91 if (
"cub" == ext)
return (
loadCube(dem) );
158 m_btbody = std::shared_ptr<btCollisionObject> (
body, BulletTargetShape::btDelete );
164 btScalar BulletTargetShape::maximumDistance()
const {
168 void BulletTargetShape::btDelete( btCollisionObject *btbody ) {
169 if (
nullptr != btbody ) {
170 delete btbody->getCollisionShape();
Bullet Target Shape for NAIF type 2 DSK models.
static BulletTargetShape * loadCube(const QString &dem, const Pvl *conf=0)
Load an ISIS cube type DEM in Bullet.
void setTargetBody(btCollisionObject *body)
Set the Bullet shape object to this object instance.
static BulletTargetShape * loadDSK(const QString &dem, const Pvl *conf=0)
Load a DSK in Bullet.
btScalar m_maximumDistance
!
btCollisionObject * body() const
Return a pointer to the Bullet target object/shape.
static BulletTargetShape * loadPC(const QString &dem, const Pvl *conf=0)
Load a point cloud type DEM in Bullet.
void writeBullet(const QString &btName) const
Write a serialized version of the target shape to a Bullet file.
static BulletTargetShape * load(const QString &dem, const Pvl *conf=0)
Load a DEM file into the target shape.
QString name() const
Return name of the target shape.
void setMaximumDistance()
Calculate and save the maximum distance across the body.
std::shared_ptr< btCollisionObject > m_btbody
!
BulletTargetShape()
Default empty constructor.
virtual ~BulletTargetShape()
Desctructor.
This is free and unencumbered software released into the public domain.