fix for btPolyhedralShape::setLocalScaling (and derived classes such as btConvexHullShape): recalcLocalAabb.

Thanks to pico for the report: http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2550&p=10207#p10207
This commit is contained in:
erwin.coumans
2008-09-02 17:32:57 +00:00
parent 21b0ccfcc2
commit cc3e3a851f
2 changed files with 7 additions and 0 deletions

View File

@@ -128,6 +128,11 @@ void btPolyhedralConvexShape::getAabb(const btTransform& trans,btVector3& aabbMi
void btPolyhedralConvexShape::setLocalScaling(const btVector3& scaling)
{
btConvexInternalShape::setLocalScaling(scaling);
recalcLocalAabb();
}
void btPolyhedralConvexShape::recalcLocalAabb()
{

View File

@@ -73,6 +73,8 @@ public:
virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
virtual void setLocalScaling(const btVector3& scaling);
void recalcLocalAabb();
virtual int getNumVertices() const = 0 ;