mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
Merge pull request #259 from AlexanderPolyakov/master
Fix for use of uninitialized variables.
This commit is contained in:
commit
11975ec60b
@ -103,11 +103,12 @@ public:
|
||||
btScalar minDimension = boxHalfExtents.getX();
|
||||
if (minDimension>boxHalfExtents.getY())
|
||||
minDimension = boxHalfExtents.getY();
|
||||
setSafeMargin(minDimension);
|
||||
|
||||
m_shapeType = BOX_2D_SHAPE_PROXYTYPE;
|
||||
btVector3 margin(getMargin(),getMargin(),getMargin());
|
||||
m_implicitShapeDimensions = (boxHalfExtents * m_localScaling) - margin;
|
||||
|
||||
setSafeMargin(minDimension);
|
||||
};
|
||||
|
||||
virtual void setMargin(btScalar collisionMargin)
|
||||
|
@ -19,10 +19,10 @@ btBoxShape::btBoxShape( const btVector3& boxHalfExtents)
|
||||
{
|
||||
m_shapeType = BOX_SHAPE_PROXYTYPE;
|
||||
|
||||
setSafeMargin(boxHalfExtents);
|
||||
|
||||
btVector3 margin(getMargin(),getMargin(),getMargin());
|
||||
m_implicitShapeDimensions = (boxHalfExtents * m_localScaling) - margin;
|
||||
|
||||
setSafeMargin(boxHalfExtents);
|
||||
};
|
||||
|
||||
|
||||
|
@ -19,10 +19,11 @@ btCylinderShape::btCylinderShape (const btVector3& halfExtents)
|
||||
:btConvexInternalShape(),
|
||||
m_upAxis(1)
|
||||
{
|
||||
setSafeMargin(halfExtents);
|
||||
|
||||
btVector3 margin(getMargin(),getMargin(),getMargin());
|
||||
m_implicitShapeDimensions = (halfExtents * m_localScaling) - margin;
|
||||
|
||||
setSafeMargin(halfExtents);
|
||||
|
||||
m_shapeType = CYLINDER_SHAPE_PROXYTYPE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user