16 #if defined (_WIN32) || defined (__i386__)
17 #define BT_USE_SSE_IN_API
31 unsigned char* pointsAddress = (
unsigned char*)points;
33 for (
int i=0;i<numPoints;i++)
37 pointsAddress += stride;
55 if (recalculateLocalAabb)
81 for (
int i=0;i<numVectors;i++)
87 for (
int j=0;j<numVectors;j++)
94 supportVerticesOut[j][3] = newDot;
184 #ifdef BT_USE_DOUBLE_PRECISION
199 for (
int i=0;i<numElem;i++,memPtr++)
206 return "btConvexHullShapeData";
216 for(
int i=0;i<numVerts;i++)
237 minProj = witnesPtMin.
dot(dir);
238 maxProj = witnesPtMax.
dot(dir);
244 btSwap(witnesPtMin,witnesPtMax);
void push_back(const T &_Val)
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
virtual int getNumPlanes() const
virtual int getNumEdges() const
virtual btVector3 localGetSupportingVertex(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 void * getUniquePointer(void *oldPtr)=0
btConvexInternalShapeData m_convexInternalShapeData
btVector3DoubleData * m_unscaledPointsDoublePtr
long maxDot(const btVector3 *array, long array_count, btScalar &dotOut) const
returns index of maximum dot product between this and vectors in array[]
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
btAlignedObjectArray< btVector3 > m_unscaledPoints
virtual void getVertex(int i, btVector3 &vtx) const
btVector3 getScaledPoint(int i) const
btScalar dot(const btVector3 &v) const
Return the dot product.
virtual btScalar getMargin() const
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
btConvexHullShape(const btScalar *points=0, int numPoints=0, int stride=sizeof(btVector3))
this constructor optionally takes in a pointer to points.
#define btVector3DataName
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const
int size() const
return the number of elements in the array
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
virtual int getNumVertices() const
btVector3FloatData * m_unscaledPointsFloatPtr
virtual void project(const btTransform &trans, const btVector3 &dir, btScalar &minProj, btScalar &maxProj, btVector3 &witnesPtMin, btVector3 &witnesPtMax) const
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btVector3 can be used to represent 3D points and vectors.
The btPolyhedralConvexAabbCachingShape adds aabb caching to the btPolyhedralConvexShape.
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
virtual void setLocalScaling(const btVector3 &scaling)
in case we receive negative scaling
void resize(int newsize, const T &fillData=T())
void addPoint(const btVector3 &point, bool recalculateLocalAabb=true)
virtual void getPlane(btVector3 &planeNormal, btVector3 &planeSupport, int i) const
virtual btChunk * allocate(size_t size, int numElements)=0
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...