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:
@@ -14,8 +14,18 @@ subject to the following restrictions:
|
||||
*/
|
||||
#include "btBoxShape.h"
|
||||
|
||||
btBoxShape::btBoxShape( const btVector3& boxHalfExtents)
|
||||
: btPolyhedralConvexShape()
|
||||
{
|
||||
m_shapeType = BOX_SHAPE_PROXYTYPE;
|
||||
|
||||
setSafeMargin(boxHalfExtents);
|
||||
|
||||
btVector3 margin(getMargin(),getMargin(),getMargin());
|
||||
m_implicitShapeDimensions = (boxHalfExtents * m_localScaling) - margin;
|
||||
};
|
||||
|
||||
|
||||
//{
|
||||
|
||||
|
||||
void btBoxShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
|
||||
|
||||
Reference in New Issue
Block a user