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:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-04-28 02:21:42 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-04-28 02:21:42 +0400
commitd4f8b416e92ec5b71bddfa688e9a63ea86510721 (patch)
treedcd3c3ea83370c53a228a4fe722c0e9353a4dc2f /source/gameengine/Physics/Bullet/CcdPhysicsController.h
parentfa826774a3f2a2db67466d38ed26fbdb845e37a4 (diff)
BGE soft body: change welding option to disable welding check by default: speeds up shape conversion. This is fine if the object has no duplicate vertices. Otherwise, bullet will be extremely slow and you can either set some welding or remove duplicates in the mesh. Welding is now displayed in linear scale: 0.0 -> 0.01, no need to use logarithmic scale ;-). Fix a bug with Bullet by which vertex array for soft body must have 3xfloat stride.
Diffstat (limited to 'source/gameengine/Physics/Bullet/CcdPhysicsController.h')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.h b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
index 4510bbddf65..4ab478b2106 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.h
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
@@ -161,8 +161,8 @@ public:
btTransform m_childTrans;
btVector3 m_childScale;
void* m_userData;
- btAlignedObjectArray<btVector3> m_vertexArray; // Contains both vertex array for polytope shape and
- // triangle array for concave mesh shape.
+ btAlignedObjectArray<btScalar> m_vertexArray; // Contains both vertex array for polytope shape and
+ // triangle array for concave mesh shape. Each vertex is 3 consecutive values
// In this case a triangle is made of 3 consecutive points
std::vector<int> m_polygonIndexArray; // Contains the array of polygon index in the
// original mesh that correspond to shape triangles.
@@ -173,11 +173,7 @@ public:
void setVertexWeldingThreshold1(float threshold)
{
- m_weldingThreshold1 = threshold;
- }
- float getVertexWeldingThreshold1() const
- {
- return m_weldingThreshold1;
+ m_weldingThreshold1 = threshold*threshold;
}
protected:
static std::map<RAS_MeshObject*, CcdShapeConstructionInfo*> m_meshShapeMap;