16#if defined(_WIN32) || defined(__i386__)
17#define BT_USE_SSE_IN_API
33 for (
int i = 0; i < numSpheres; i++)
43#define MIN(_a, _b) ((_a) < (_b) ? (_a) : (_b))
70 for (
int k = 0; k < numSpheres; k += 128)
73 int inner_count =
MIN(numSpheres - k, 128);
74 for (
long i = 0; i < inner_count; i++)
80 long i = vec.
maxDot(temp, inner_count, newDot);
93 for (
int j = 0; j < numVectors; j++)
106 for (
int k = 0; k < numSpheres; k += 128)
109 int inner_count =
MIN(numSpheres - k, 128);
110 for (
long i = 0; i < inner_count; i++)
116 long i = vec.
maxDot(temp, inner_count, newDot);
120 supportVerticesOut[j] = temp[i];
139 mass / (
btScalar(12.0)) * (lx * lx + lz * lz),
140 mass / (
btScalar(12.0)) * (lx * lx + ly * ly));
157 for (
int i = 0; i < numElem; i++, memPtr++)
168 return "btMultiSphereShapeData";
@ MULTI_SPHERE_SHAPE_PROXYTYPE
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar btSqrt(btScalar y)
void getCachedLocalAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
btConvexInternalAabbCachingShape()
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual btScalar getMargin() const
btAlignedObjectArray< btVector3 > m_localPositionArray
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
btConvexShape Interface
btAlignedObjectArray< btScalar > m_radiArray
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 batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
CollisionShape Interface.
virtual btChunk * allocate(size_t size, int numElements)=0
virtual void * getUniquePointer(void *oldPtr)=0
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
btVector3 can be used to represent 3D points and vectors.
const btScalar & z() const
Return the z value.
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
long maxDot(const btVector3 *array, long array_count, btScalar &dotOut) const
returns index of maximum dot product between this and vectors in array[]
btScalar length2() const
Return the length of the vector squared.
const btScalar & x() const
Return the x value.
const btScalar & y() const
Return the y value.
btConvexInternalShapeData m_convexInternalShapeData
int m_localPositionArraySize
btPositionAndRadius * m_localPositionArrayPtr