2018-09-07 16:11:04 +02:00
|
|
|
#ifndef BT_SDF_COLLISION_SHAPE_H
|
|
|
|
#define BT_SDF_COLLISION_SHAPE_H
|
|
|
|
|
|
|
|
#include "btConcaveShape.h"
|
|
|
|
|
|
|
|
class btSdfCollisionShape : public btConcaveShape
|
|
|
|
{
|
|
|
|
struct btSdfCollisionShapeInternalData* m_data;
|
|
|
|
|
|
|
|
public:
|
|
|
|
btSdfCollisionShape();
|
|
|
|
virtual ~btSdfCollisionShape();
|
2019-01-03 14:26:51 +01:00
|
|
|
|
2018-09-07 16:11:04 +02:00
|
|
|
bool initializeSDF(const char* sdfData, int sizeInBytes);
|
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
virtual void getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
|
|
|
|
virtual void setLocalScaling(const btVector3& scaling);
|
2018-09-07 16:11:04 +02:00
|
|
|
virtual const btVector3& getLocalScaling() const;
|
2019-01-03 14:26:51 +01:00
|
|
|
virtual void calculateLocalInertia(btScalar mass, btVector3& inertia) const;
|
|
|
|
virtual const char* getName() const;
|
|
|
|
virtual void setMargin(btScalar margin);
|
|
|
|
virtual btScalar getMargin() const;
|
2018-09-07 16:11:04 +02:00
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
virtual void processAllTriangles(btTriangleCallback* callback, const btVector3& aabbMin, const btVector3& aabbMax) const;
|
2018-09-07 16:11:04 +02:00
|
|
|
|
|
|
|
bool queryPoint(const btVector3& ptInSDF, btScalar& distOut, btVector3& normal);
|
|
|
|
};
|
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
#endif //BT_SDF_COLLISION_SHAPE_H
|