summaryrefslogtreecommitdiff
path: root/thirdparty/bullet/BulletCollision/CollisionShapes/btSdfCollisionShape.h
blob: 6e32db9cd8610927c2bd31999a71f0890241477e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#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();
	
	bool initializeSDF(const char* sdfData, int sizeInBytes);

	virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
	virtual void	setLocalScaling(const btVector3& scaling);
	virtual const btVector3& getLocalScaling() const;
	virtual void	calculateLocalInertia(btScalar mass,btVector3& inertia) const;
	virtual const char*	getName()const;
	virtual void	setMargin(btScalar margin);
	virtual btScalar	getMargin() const;

	virtual void	processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;

	bool queryPoint(const btVector3& ptInSDF, btScalar& distOut, btVector3& normal);
};

#endif //BT_SDF_COLLISION_SHAPE_H