Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
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);
btAlignedObjectArray< btVector3 > vertices
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
virtual void getPlane(btVector3 &planeNormal, btVector3 &planeSupport, int i) const
btVector3FloatData * m_unscaledPointsFloatPtr
virtual void * getUniquePointer(void *oldPtr)=0
virtual int getNumEdges() const
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
btScalar dot(const btVector3 &v) const
Return the dot product.
void optimizeConvexHull()
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
The btPolyhedralConvexAabbCachingShape adds aabb caching to the btPolyhedralConvexShape.
btVector3 getScaledPoint(int i) const
void resize(int newsize, const T &fillData=T())
Convex hull implementation based on Preparata and Hong See http://code.google.com/p/bullet/issues/det...
virtual void setLocalScaling(const btVector3 &scaling)
in case we receive negative scaling
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
virtual int getNumPlanes() const
btVector3 can be used to represent 3D points and vectors.
virtual int getNumVertices() const
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
virtual btScalar getMargin() const
#define btVector3DataName
btConvexInternalShapeData m_convexInternalShapeData
btVector3DoubleData * m_unscaledPointsDoublePtr
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
void addPoint(const btVector3 &point, bool recalculateLocalAabb=true)
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
btScalar compute(const void *coords, bool doubleCoords, int stride, int count, btScalar shrink, btScalar shrinkClamp)
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
void push_back(const T &_Val)
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
virtual btChunk * allocate(size_t size, int numElements)=0
virtual void getVertex(int i, btVector3 &vtx) const
int size() const
return the number of elements in the array
btScalar length2() const
Return the length of the vector squared.
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
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