Avoid using SSE in API when BT_USE_SSE_IN_API is not defined
Fixes Issue 683.
This commit is contained in:
@@ -13,6 +13,10 @@ subject to the following restrictions:
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#if defined (_WIN32) || defined (__i386__)
|
||||
#define BT_USE_SSE_IN_API
|
||||
#endif
|
||||
|
||||
#include "btConvexHullShape.h"
|
||||
#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
|
||||
|
||||
@@ -45,10 +49,11 @@ void btConvexHullShape::setLocalScaling(const btVector3& scaling)
|
||||
recalcLocalAabb();
|
||||
}
|
||||
|
||||
void btConvexHullShape::addPoint(const btVector3& point)
|
||||
void btConvexHullShape::addPoint(const btVector3& point, bool recalculateLocalAabb)
|
||||
{
|
||||
m_unscaledPoints.push_back(point);
|
||||
recalcLocalAabb();
|
||||
if (recalculateLocalAabb)
|
||||
recalcLocalAabb();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
///btConvexHullShape make an internal copy of the points.
|
||||
btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btVector3));
|
||||
|
||||
void addPoint(const btVector3& point);
|
||||
void addPoint(const btVector3& point, bool recalculateLocalAabb = true);
|
||||
|
||||
|
||||
btVector3* getUnscaledPoints()
|
||||
|
||||
@@ -13,6 +13,10 @@ subject to the following restrictions:
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#if defined (_WIN32) || defined (__i386__)
|
||||
#define BT_USE_SSE_IN_API
|
||||
#endif
|
||||
|
||||
#include "btConvexShape.h"
|
||||
#include "btTriangleShape.h"
|
||||
#include "btSphereShape.h"
|
||||
|
||||
@@ -13,7 +13,9 @@ subject to the following restrictions:
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
|
||||
#if defined (_WIN32) || defined (__i386__)
|
||||
#define BT_USE_SSE_IN_API
|
||||
#endif
|
||||
|
||||
#include "btMultiSphereShape.h"
|
||||
#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
|
||||
@@ -40,7 +42,7 @@ btMultiSphereShape::btMultiSphereShape (const btVector3* positions,const btScala
|
||||
}
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN( _a, _b) ((_a) < (_b) ? (_a) : (_b))
|
||||
#define MIN( _a, _b) ((_a) < (_b) ? (_a) : (_b))
|
||||
#endif
|
||||
btVector3 btMultiSphereShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
|
||||
{
|
||||
@@ -67,10 +69,10 @@ btMultiSphereShape::btMultiSphereShape (const btVector3* positions,const btScala
|
||||
const btScalar* rad = &m_radiArray[0];
|
||||
int numSpheres = m_localPositionArray.size();
|
||||
|
||||
for( int k = 0; k < numSpheres; k+= 128 )
|
||||
{
|
||||
btVector3 temp[128];
|
||||
int inner_count = MIN( numSpheres - k, 128 );
|
||||
for( int k = 0; k < numSpheres; k+= 128 )
|
||||
{
|
||||
btVector3 temp[128];
|
||||
int inner_count = MIN( numSpheres - k, 128 );
|
||||
for( long i = 0; i < inner_count; i++ )
|
||||
{
|
||||
temp[i] = (*pos) +vec*m_localScaling*(*rad) - vec * getMargin();
|
||||
|
||||
@@ -12,6 +12,9 @@ subject to the following restrictions:
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#if defined (_WIN32) || defined (__i386__)
|
||||
#define BT_USE_SSE_IN_API
|
||||
#endif
|
||||
|
||||
#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
|
||||
#include "btConvexPolyhedron.h"
|
||||
|
||||
Reference in New Issue
Block a user