Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btSdfCollisionShape.h')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btSdfCollisionShape.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btSdfCollisionShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btSdfCollisionShape.h
new file mode 100644
index 00000000000..3989d6245ed
--- /dev/null
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btSdfCollisionShape.h
@@ -0,0 +1,29 @@
+#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