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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user