bugfix in aabb expansion, causing the convexSweepTest to fail in certain cases
(when the AABB is not symmetric around the origin) Thanks to fishboy82 for the report and fix: See http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=4484 http://code.google.com/p/bullet/issues/detail?id=322
This commit is contained in:
@@ -961,8 +961,8 @@ inline void btDbvt::rayTestInternal( const btDbvtNode* root,
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
const btDbvtNode* node=stack[--depth];
|
const btDbvtNode* node=stack[--depth];
|
||||||
bounds[0] = node->volume.Mins()+aabbMin;
|
bounds[0] = node->volume.Mins()-aabbMax;
|
||||||
bounds[1] = node->volume.Maxs()+aabbMax;
|
bounds[1] = node->volume.Maxs()-aabbMin;
|
||||||
btScalar tmin=1.f,lambda_min=0.f;
|
btScalar tmin=1.f,lambda_min=0.f;
|
||||||
unsigned int result1=false;
|
unsigned int result1=false;
|
||||||
result1 = btRayAabb2(rayFrom,rayDirectionInverse,signs,bounds,tmin,lambda_min,lambda_max);
|
result1 = btRayAabb2(rayFrom,rayDirectionInverse,signs,bounds,tmin,lambda_min,lambda_max);
|
||||||
|
|||||||
@@ -493,8 +493,8 @@ void btQuantizedBvh::walkStacklessTreeAgainstRay(btNodeOverlapCallback* nodeCall
|
|||||||
bounds[0] = rootNode->m_aabbMinOrg;
|
bounds[0] = rootNode->m_aabbMinOrg;
|
||||||
bounds[1] = rootNode->m_aabbMaxOrg;
|
bounds[1] = rootNode->m_aabbMaxOrg;
|
||||||
/* Add box cast extents */
|
/* Add box cast extents */
|
||||||
bounds[0] += aabbMin;
|
bounds[0] -= aabbMax;
|
||||||
bounds[1] += aabbMax;
|
bounds[1] -= aabbMin;
|
||||||
|
|
||||||
aabbOverlap = TestAabbAgainstAabb2(rayAabbMin,rayAabbMax,rootNode->m_aabbMinOrg,rootNode->m_aabbMaxOrg);
|
aabbOverlap = TestAabbAgainstAabb2(rayAabbMin,rayAabbMax,rootNode->m_aabbMinOrg,rootNode->m_aabbMaxOrg);
|
||||||
//perhaps profile if it is worth doing the aabbOverlap test first
|
//perhaps profile if it is worth doing the aabbOverlap test first
|
||||||
@@ -617,8 +617,8 @@ void btQuantizedBvh::walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback*
|
|||||||
bounds[0] = unQuantize(rootNode->m_quantizedAabbMin);
|
bounds[0] = unQuantize(rootNode->m_quantizedAabbMin);
|
||||||
bounds[1] = unQuantize(rootNode->m_quantizedAabbMax);
|
bounds[1] = unQuantize(rootNode->m_quantizedAabbMax);
|
||||||
/* Add box cast extents */
|
/* Add box cast extents */
|
||||||
bounds[0] += aabbMin;
|
bounds[0] -= aabbMax;
|
||||||
bounds[1] += aabbMax;
|
bounds[1] -= aabbMin;
|
||||||
btVector3 normal;
|
btVector3 normal;
|
||||||
#if 0
|
#if 0
|
||||||
bool ra2 = btRayAabb2 (raySource, rayDirection, sign, bounds, param, 0.0, lambda_max);
|
bool ra2 = btRayAabb2 (raySource, rayDirection, sign, bounds, param, 0.0, lambda_max);
|
||||||
|
|||||||
Reference in New Issue
Block a user