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";
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btScalar length2() const
Return the length of the vector squared.
int m_localPositionArraySize
virtual void * getUniquePointer(void *oldPtr)=0
btScalar btSqrt(btScalar y)
btAlignedObjectArray< btScalar > m_radiArray
long maxDot(const btVector3 *array, long array_count, btScalar &dotOut) const
returns index of maximum dot product between this and vectors in array[]
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
const btScalar & x() const
Return the x value.
virtual btScalar getMargin() const
btPositionAndRadius * m_localPositionArrayPtr
const btScalar & y() const
Return the y value.
const btScalar & z() const
Return the z value.
btConvexInternalAabbCachingShape adds local aabb caching for convex shapes, to avoid expensive boundi...
btVector3 can be used to represent 3D points and vectors.
int size() const
return the number of elements in the array
void getCachedLocalAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
btConvexShape Interface
void resize(int newsize, const T &fillData=T())
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
CollisionShape Interface.
btConvexInternalShapeData m_convexInternalShapeData
btMultiSphereShape(const btVector3 *positions, const btScalar *radi, int numSpheres)
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
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...