From 2a871176d498ac30a71984ce0baab3953b9d0ef2 Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Wed, 29 Oct 2008 07:01:56 +0000 Subject: [PATCH] fix broken OS X build --- .../BroadphaseCollision/btDbvt.h | 6 +++--- src/BulletSoftBody/btSoftBody.cpp | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/BulletCollision/BroadphaseCollision/btDbvt.h b/src/BulletCollision/BroadphaseCollision/btDbvt.h index 56c9a8fae..72a5b36fc 100644 --- a/src/BulletCollision/BroadphaseCollision/btDbvt.h +++ b/src/BulletCollision/BroadphaseCollision/btDbvt.h @@ -794,13 +794,13 @@ inline void btDbvt::collideTT( const btDbvtNode* root0, m_stkStack.resize(DOUBLE_STACKSIZE); m_stkStack[0]=sStkNN(root0,root1); do { - sStkNN p=stack[--depth]; + sStkNN p=m_stkStack[--depth]; if(Intersect(p.a->volume,p.b->volume,xform)) { if(depth>treshold) { - m_stkStack.resize(stack.size()*2); - treshold=stack.size()-4; + m_stkStack.resize(m_stkStack.size()*2); + treshold=m_stkStack.size()-4; } if(p.a->isinternal()) { diff --git a/src/BulletSoftBody/btSoftBody.cpp b/src/BulletSoftBody/btSoftBody.cpp index 37b3c5202..90056587a 100644 --- a/src/BulletSoftBody/btSoftBody.cpp +++ b/src/BulletSoftBody/btSoftBody.cpp @@ -486,13 +486,17 @@ void btSoftBody::setTotalDensity(btScalar density) void btSoftBody::transform(const btTransform& trs) { const btScalar margin=getCollisionShape()->getMargin(); + ATTRIBUTE_ALIGNED16(btDbvtVolume) vol; + for(int i=0,ni=m_nodes.size();igetMargin(); + ATTRIBUTE_ALIGNED16(btDbvtVolume) vol; + for(int i=0,ni=m_nodes.size();im_v+ f.m_n[1]->m_v+ f.m_n[2]->m_v)/3; + vol = VolumeOf(f,m_sst.radmrg); m_fdbvt.update( f.m_leaf, - VolumeOf(f,m_sst.radmrg), + vol, v*m_sst.velmrg, m_sst.updmrg); }