btDbvtVolume needs to be 16-byte aligned, otherwise SIMD version crashes.
This commit is contained in:
@@ -183,7 +183,7 @@ void btCompoundCollisionAlgorithm::processCollision (btCollisionObject* body0,bt
|
|||||||
otherInCompoundSpace = colObj->getWorldTransform().inverse() * otherObj->getWorldTransform();
|
otherInCompoundSpace = colObj->getWorldTransform().inverse() * otherObj->getWorldTransform();
|
||||||
otherObj->getCollisionShape()->getAabb(otherInCompoundSpace,localAabbMin,localAabbMax);
|
otherObj->getCollisionShape()->getAabb(otherInCompoundSpace,localAabbMin,localAabbMax);
|
||||||
|
|
||||||
const btDbvtVolume bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax);
|
const ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax);
|
||||||
//process all children, that overlap with the given AABB bounds
|
//process all children, that overlap with the given AABB bounds
|
||||||
tree->collideTV(tree->m_root,bounds,callback);
|
tree->collideTV(tree->m_root,bounds,callback);
|
||||||
|
|
||||||
|
|||||||
@@ -2002,7 +2002,7 @@ for(i=0;i<m_clusters.size();++i)
|
|||||||
mi.setMin(c.m_nodes[j]->m_x);
|
mi.setMin(c.m_nodes[j]->m_x);
|
||||||
mx.setMax(c.m_nodes[j]->m_x);
|
mx.setMax(c.m_nodes[j]->m_x);
|
||||||
}
|
}
|
||||||
const btDbvtVolume bounds=btDbvtVolume::FromMM(mi,mx);
|
const ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(mi,mx);
|
||||||
if(c.m_leaf)
|
if(c.m_leaf)
|
||||||
m_cdbvt.update(c.m_leaf,bounds,c.m_lv*m_sst.sdt*3,m_sst.radmrg);
|
m_cdbvt.update(c.m_leaf,bounds,c.m_lv*m_sst.sdt*3,m_sst.radmrg);
|
||||||
else
|
else
|
||||||
@@ -2532,7 +2532,7 @@ switch(m_cfg.collisions&fCollision::RVSmask)
|
|||||||
const btScalar basemargin=getCollisionShape()->getMargin();
|
const btScalar basemargin=getCollisionShape()->getMargin();
|
||||||
btVector3 mins;
|
btVector3 mins;
|
||||||
btVector3 maxs;
|
btVector3 maxs;
|
||||||
btDbvtVolume volume;
|
ATTRIBUTE_ALIGNED16(btDbvtVolume) volume;
|
||||||
pco->getCollisionShape()->getAabb( pco->getInterpolationWorldTransform(),
|
pco->getCollisionShape()->getAabb( pco->getInterpolationWorldTransform(),
|
||||||
mins,
|
mins,
|
||||||
maxs);
|
maxs);
|
||||||
|
|||||||
@@ -750,7 +750,8 @@ struct btSoftColliders
|
|||||||
friction = btMin(psb->m_cfg.kDF,prb->getFriction());
|
friction = btMin(psb->m_cfg.kDF,prb->getFriction());
|
||||||
btVector3 mins;
|
btVector3 mins;
|
||||||
btVector3 maxs;
|
btVector3 maxs;
|
||||||
btDbvtVolume volume;
|
|
||||||
|
ATTRIBUTE_ALIGNED16(btDbvtVolume) volume;
|
||||||
pr->getCollisionShape()->getAabb(pr->getInterpolationWorldTransform(),mins,maxs);
|
pr->getCollisionShape()->getAabb(pr->getInterpolationWorldTransform(),mins,maxs);
|
||||||
volume=btDbvtVolume::FromMM(mins,maxs);
|
volume=btDbvtVolume::FromMM(mins,maxs);
|
||||||
volume.Expand(btVector3(1,1,1)*margin);
|
volume.Expand(btVector3(1,1,1)*margin);
|
||||||
|
|||||||
Reference in New Issue
Block a user