updated test1.oec with a few static objects
fix Maya plugin hinge constraint support update copyright year in BulletCollision/CollisionShapes.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library
|
||||
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||
Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
@@ -13,6 +13,8 @@ subject to the following restrictions:
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "btMultiSphereShape.h"
|
||||
#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
|
||||
#include "LinearMath/btQuaternion.h"
|
||||
@@ -23,15 +25,15 @@ btMultiSphereShape::btMultiSphereShape (const btVector3& inertiaHalfExtents,cons
|
||||
m_shapeType = MULTI_SPHERE_SHAPE_PROXYTYPE;
|
||||
btScalar startMargin = btScalar(1e30);
|
||||
|
||||
m_numSpheres = numSpheres;
|
||||
for (int i=0;i<m_numSpheres;i++)
|
||||
m_localPositionArray.resize(numSpheres);
|
||||
m_radiArray.resize(numSpheres);
|
||||
for (int i=0;i<numSpheres;i++)
|
||||
{
|
||||
m_localPositions[i] = positions[i];
|
||||
m_radi[i] = radi[i];
|
||||
if (radi[i] < startMargin)
|
||||
startMargin = radi[i];
|
||||
m_localPositionArray[i] = positions[i];
|
||||
m_radiArray[i] = radi[i];
|
||||
|
||||
}
|
||||
setMargin(startMargin);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -60,10 +62,11 @@ btMultiSphereShape::btMultiSphereShape (const btVector3& inertiaHalfExtents,cons
|
||||
btVector3 vtx;
|
||||
btScalar newDot;
|
||||
|
||||
const btVector3* pos = &m_localPositions[0];
|
||||
const btScalar* rad = &m_radi[0];
|
||||
const btVector3* pos = &m_localPositionArray[0];
|
||||
const btScalar* rad = &m_radiArray[0];
|
||||
int numSpheres = m_localPositionArray.size();
|
||||
|
||||
for (i=0;i<m_numSpheres;i++)
|
||||
for (i=0;i<numSpheres;i++)
|
||||
{
|
||||
vtx = (*pos) +vec*m_localScaling*(*rad) - vec * getMargin();
|
||||
pos++;
|
||||
@@ -92,10 +95,10 @@ btMultiSphereShape::btMultiSphereShape (const btVector3& inertiaHalfExtents,cons
|
||||
btVector3 vtx;
|
||||
btScalar newDot;
|
||||
|
||||
const btVector3* pos = &m_localPositions[0];
|
||||
const btScalar* rad = &m_radi[0];
|
||||
|
||||
for (int i=0;i<m_numSpheres;i++)
|
||||
const btVector3* pos = &m_localPositionArray[0];
|
||||
const btScalar* rad = &m_radiArray[0];
|
||||
int numSpheres = m_localPositionArray.size();
|
||||
for (int i=0;i<numSpheres;i++)
|
||||
{
|
||||
vtx = (*pos) +vec*m_localScaling*(*rad) - vec * getMargin();
|
||||
pos++;
|
||||
|
||||
Reference in New Issue
Block a user