avoid one redundant motionstate synchronization

minor warning fix
This commit is contained in:
erwin.coumans
2009-08-11 23:50:59 +00:00
parent d67aa861f2
commit d7c7c0c9ef
3 changed files with 9 additions and 8 deletions

View File

@@ -20,10 +20,10 @@ subject to the following restrictions:
btCompoundShape::btCompoundShape(bool enableDynamicAabbTree)
: m_localAabbMin(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT)),
m_localAabbMax(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT)),
m_collisionMargin(btScalar(0.)),
m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)),
m_dynamicAabbTree(0),
m_updateRevision(1)
m_updateRevision(1),
m_collisionMargin(btScalar(0.)),
m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.))
{
m_shapeType = COMPOUND_SHAPE_PROXYTYPE;
@@ -93,7 +93,7 @@ void btCompoundShape::updateChildTransform(int childIndex, const btTransform& ne
btVector3 localAabbMin,localAabbMax;
m_children[childIndex].m_childShape->getAabb(newChildTransform,localAabbMin,localAabbMax);
ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax);
int index = m_children.size()-1;
//int index = m_children.size()-1;
m_dynamicAabbTree->update(m_children[childIndex].m_node,bounds);
}

View File

@@ -343,9 +343,10 @@ int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps,
synchronizeMotionStates();
}
}
} else
{
synchronizeMotionStates();
}
clearForces();

View File

@@ -427,7 +427,7 @@ void spuWalkStacklessQuantizedTreeAgainstRays(RaycastTask_LocalStoreMemory* lsMe
while (curIndex < endNodeIndex)
{
//catch bugs in tree data
assert (walkIterations < subTreeSize);
// btAssert (walkIterations < subTreeSize);
walkIterations++;