Choose a default 'safe' collision margin for very small convex collision shapes, in particular btBoxShape and btCylinderShape

and add some documentation in btConvexInternalShape.h
Thanks to Simon Lundmark for the suggestion

Fixes http://code.google.com/p/bullet/issues/detail?id=349
This commit is contained in:
erwin.coumans
2011-09-15 18:17:20 +00:00
parent a13d22dc84
commit 69a932f13e
6 changed files with 45 additions and 10 deletions

View File

@@ -80,13 +80,7 @@ public:
}
btBoxShape( const btVector3& boxHalfExtents)
: btPolyhedralConvexShape()
{
m_shapeType = BOX_SHAPE_PROXYTYPE;
btVector3 margin(getMargin(),getMargin(),getMargin());
m_implicitShapeDimensions = (boxHalfExtents * m_localScaling) - margin;
};
btBoxShape( const btVector3& boxHalfExtents);
virtual void setMargin(btScalar collisionMargin)
{