+ Optimization: move some variable declarations outside of the innerloop in btCompoundCollisionAlgorithm.cpp

Thanks to mccdo at iastate.edu for the contribution, see Issue 373
+ Optimization: removed some unnecessary code in btConvexHullShape::localGetSupportingVertexWithoutMargin
+ Added autogenerated Visual Studio 2005 projectfiles (using a patched cmake 2.8.1 to avoid any references to cmake/absolute paths)
This commit is contained in:
erwin.coumans
2010-04-12 17:46:56 +00:00
parent 07f51390ea
commit 0fbd9d49c4
50 changed files with 14956 additions and 29 deletions

View File

@@ -52,23 +52,11 @@ void btConvexHullShape::addPoint(const btVector3& point)
}
btVector3 btConvexHullShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
btVector3 btConvexHullShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
{
btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.));
btScalar newDot,maxDot = btScalar(-BT_LARGE_FLOAT);
btVector3 vec = vec0;
btScalar lenSqr = vec.length2();
if (lenSqr < btScalar(0.0001))
{
vec.setValue(1,0,0);
} else
{
btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
vec *= rlen;
}
for (int i=0;i<m_unscaledPoints.size();i++)
{
btVector3 vtx = m_unscaledPoints[i] * m_localScaling;