16#if defined(_WIN32) || defined(__i386__)
17#define BT_USE_SSE_IN_API
33 unsigned char* pointsAddress = (
unsigned char*)points;
35 for (
int i = 0; i < numPoints; i++)
39 pointsAddress += stride;
54 if (recalculateLocalAabb)
79 for (
int i = 0; i < numVectors; i++)
85 for (
int j = 0; j < numVectors; j++)
92 supportVerticesOut[j][3] = newDot;
122 for (
int i = 0; i < numVerts; i++)
179#ifdef BT_USE_DOUBLE_PRECISION
194 for (
int i = 0; i < numElem; i++, memPtr++)
204 return "btConvexHullShapeData";
214 for (
int i = 0; i < numVerts; i++)
235 minProj = witnesPtMin.
dot(dir);
236 maxProj = witnesPtMax.
dot(dir);
239 if (minProj > maxProj)
242 btSwap(witnesPtMin, witnesPtMax);
@ CONVEX_HULL_SHAPE_PROXYTYPE
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define btVector3DataName
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
void push_back(const T &_Val)
Convex hull implementation based on Preparata and Hong See http://code.google.com/p/bullet/issues/det...
btScalar compute(const void *coords, bool doubleCoords, int stride, int count, btScalar shrink, btScalar shrinkClamp)
btAlignedObjectArray< btVector3 > vertices
btConvexHullShape(const btScalar *points=0, int numPoints=0, int stride=sizeof(btVector3))
this constructor optionally takes in a pointer to points.
btAlignedObjectArray< btVector3 > m_unscaledPoints
virtual int getNumPlanes() const
virtual int getNumVertices() const
void optimizeConvexHull()
virtual int getNumEdges() const
virtual void getVertex(int i, btVector3 &vtx) const
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const
virtual void project(const btTransform &trans, const btVector3 &dir, btScalar &minProj, btScalar &maxProj, btVector3 &witnesPtMin, btVector3 &witnesPtMax) const
btVector3 getScaledPoint(int i) const
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const
virtual void getPlane(btVector3 &planeNormal, btVector3 &planeSupport, int i) const
void addPoint(const btVector3 &point, bool recalculateLocalAabb=true)
virtual void setLocalScaling(const btVector3 &scaling)
in case we receive negative scaling
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
The btPolyhedralConvexAabbCachingShape adds aabb caching to the btPolyhedralConvexShape.
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.
btScalar dot(const btVector3 &v) const
Return the dot product.
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.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btVector3DoubleData * m_unscaledPointsDoublePtr
btVector3FloatData * m_unscaledPointsFloatPtr
btConvexInternalShapeData m_convexInternalShapeData