2018-09-07 14:11:04 +00: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 13:26:51 +00:00
|
|
|
|
2018-09-07 14:11:04 +00:00
|
|
|
bool initializeSDF(const char* sdfData, int sizeInBytes);
|
|
|
|
|
2019-01-03 13:26:51 +00:00
|
|
|
virtual void getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
|
|
|
|
virtual void setLocalScaling(const btVector3& scaling);
|
2018-09-07 14:11:04 +00:00
|
|
|
virtual const btVector3& getLocalScaling() const;
|
2019-01-03 13:26:51 +00: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 14:11:04 +00:00
|
|
|
|
2019-01-03 13:26:51 +00:00
|
|
|
virtual void processAllTriangles(btTriangleCallback* callback, const btVector3& aabbMin, const btVector3& aabbMax) const;
|
2018-09-07 14:11:04 +00:00
|
|
|
|
|
|
|
bool queryPoint(const btVector3& ptInSDF, btScalar& distOut, btVector3& normal);
|
|
|
|
};
|
|
|
|
|
2019-01-03 13:26:51 +00:00
|
|
|
#endif //BT_SDF_COLLISION_SHAPE_H
|