16 #if defined (_WIN32) || defined (__i386__)
17 #define BT_USE_SSE_IN_API
33 for (
int i=0;i<numSpheres;i++)
45 #define MIN( _a, _b) ((_a) < (_b) ? (_a) : (_b))
72 for(
int k = 0; k < numSpheres; k+= 128 )
75 int inner_count =
MIN( numSpheres - k, 128 );
76 for(
long i = 0; i < inner_count; i++ )
82 long i = vec.
maxDot( temp, inner_count, newDot);
97 for (
int j=0;j<numVectors;j++)
110 for(
int k = 0; k < numSpheres; k+= 128 )
113 int inner_count =
MIN( numSpheres - k, 128 );
114 for(
long i = 0; i < inner_count; i++ )
120 long i = vec.
maxDot( temp, inner_count, newDot);
121 if( newDot > maxDot )
124 supportVerticesOut[j] = temp[i];
151 mass/(
btScalar(12.0)) * (lx*lx + lz*lz),
152 mass/(
btScalar(12.0)) * (lx*lx + ly*ly));
171 for (
int i=0;i<numElem;i++,memPtr++)
179 return "btMultiSphereShapeData";
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
int m_localPositionArraySize
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual void * getUniquePointer(void *oldPtr)=0
btScalar btSqrt(btScalar y)
long maxDot(const btVector3 *array, long array_count, btScalar &dotOut) const
returns index of maximum dot product between this and vectors in array[]
btAlignedObjectArray< btScalar > m_radiArray
virtual btScalar getMargin() const
const btScalar & x() const
Return the x value.
void getCachedLocalAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
int size() const
return the number of elements in the array
btPositionAndRadius * m_localPositionArrayPtr
btConvexInternalAabbCachingShape adds local aabb caching for convex shapes, to avoid expensive boundi...
const btScalar & y() const
Return the y value.
btVector3 can be used to represent 3D points and vectors.
btScalar length2() const
Return the length of the vector squared.
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
void resize(int newsize, const T &fillData=T())
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
btConvexShape Interface
btConvexInternalShapeData m_convexInternalShapeData
btMultiSphereShape(const btVector3 *positions, const btScalar *radi, int numSpheres)
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
CollisionShape Interface.
virtual btChunk * allocate(size_t size, int numElements)=0
btAlignedObjectArray< btVector3 > m_localPositionArray
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
const btScalar & z() const
Return the z value.