diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2008-09-26 10:25:35 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2008-09-26 10:25:35 +0400 |
commit | 9d3c77ec6277b28993f76804cd975b3684a304e9 (patch) | |
tree | 319f17a31f758acf43df472fde7c35a4a715345b /source/gameengine/Physics/Bullet/CcdPhysicsController.h | |
parent | a1bef84ea859cf85487d4cac8664402dd86f4465 (diff) |
support concave soft bodies, preliminary. could be used for cloth too. need vertex pinning/constraint attach to other objects.
Diffstat (limited to 'source/gameengine/Physics/Bullet/CcdPhysicsController.h')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsController.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.h b/source/gameengine/Physics/Bullet/CcdPhysicsController.h index 5d35482dd46..60c734838f3 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.h +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.h @@ -43,6 +43,8 @@ class btCollisionShape; class CcdShapeConstructionInfo { public: + + static CcdShapeConstructionInfo* FindMesh(RAS_MeshObject* mesh, bool polytope); CcdShapeConstructionInfo() : @@ -54,7 +56,8 @@ public: m_refCount(1), m_meshObject(NULL), m_unscaledShape(NULL), - m_useGimpact(false) + m_useGimpact(false), + m_weldingThreshold(0.f) { m_childTrans.setIdentity(); } @@ -111,6 +114,14 @@ public: // original mesh that correspond to shape triangles. // only set for concave mesh shape. + void setVertexWeldingThreshold(float threshold) + { + m_weldingThreshold = threshold; + } + float getVertexWeldingThreshold() const + { + return m_weldingThreshold; + } protected: static std::map<RAS_MeshObject*, CcdShapeConstructionInfo*> m_meshShapeMap; int m_refCount; // this class is shared between replicas @@ -119,7 +130,9 @@ protected: btBvhTriangleMeshShape* m_unscaledShape;// holds the shared unscale BVH mesh shape, // the actual shape is of type btScaledBvhTriangleMeshShape std::vector<CcdShapeConstructionInfo*> m_shapeArray; // for compound shapes - bool m_useGimpact; + bool m_useGimpact; //use gimpact for concave dynamic/moving collision detection + float m_weldingThreshold; //welding closeby vertices together can improve softbody stability etc. + }; struct CcdConstructionInfo |