16 #if defined(_WIN32) || defined(__i386__)
17 #define BT_USE_SSE_IN_API
31 m_unscaledPoints.resize(numPoints);
33 unsigned char* pointsAddress = (
unsigned char*)points;
35 for (
int i = 0; i < numPoints; i++)
38 m_unscaledPoints[i] =
btVector3(point[0], point[1], point[2]);
53 m_unscaledPoints.push_back(point);
64 if (0 < m_unscaledPoints.size())
67 int index = (int)
scaled.maxDot(&m_unscaledPoints[0], m_unscaledPoints.size(),
maxDot);
79 for (
int i = 0; i < numVectors; i++)
85 for (
int j = 0; j < numVectors; j++)
88 if (0 < m_unscaledPoints.size())
90 int i = (int)vec.maxDot(&m_unscaledPoints[0], m_unscaledPoints.size(), newDot);
92 supportVerticesOut[j][3] = newDot;
119 conv.compute(&m_unscaledPoints[0].
getX(),
sizeof(
btVector3), m_unscaledPoints.size(), 0.f, 0.f);
121 m_unscaledPoints.resize(0);
122 for (
int i = 0; i < numVerts; i++)
124 m_unscaledPoints.push_back(conv.
vertices[i]);
132 return m_unscaledPoints.size();
137 return m_unscaledPoints.size();
142 int index0 = i % m_unscaledPoints.size();
143 int index1 = (i + 1) % m_unscaledPoints.size();
177 int numElem = m_unscaledPoints.size();
179 #ifdef BT_USE_DOUBLE_PRECISION
194 for (
int i = 0; i < numElem; i++, memPtr++)
196 m_unscaledPoints[i].serialize(*memPtr);
204 return "btConvexHullShapeData";
213 int numVerts = m_unscaledPoints.size();
214 for (
int i = 0; i < numVerts; i++)
231 btVector3 localAxis = dir * trans.getBasis();
235 minProj = witnesPtMin.dot(dir);
236 maxProj = witnesPtMax.dot(dir);
239 if (minProj > maxProj)
242 btSwap(witnesPtMin, witnesPtMax);
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
virtual void setLocalScaling(const btVector3 &scaling)
in case we receive negative scaling
SIMD_FORCE_INLINE btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
btConvexShape Interface
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const
virtual int getNumVertices() const
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const
virtual void getVertex(int i, btVector3 &vtx) const
virtual int getNumPlanes() const
virtual void getPlane(btVector3 &planeNormal, btVector3 &planeSupport, int i) const
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
virtual int getNumEdges() const
@ CONVEX_HULL_SHAPE_PROXYTYPE
virtual btScalar getMargin() const =0
virtual void recalculateLocalAabb()
btConvexHullShape(const btScalar *points=0, int numPoints=0, int stride=sizeof(btVector3))
SIMD_FORCE_INLINE btVector3 getScaledPoint(int i) const
void optimizeConvexHull()
void addPoint(const btVector3 &point, bool recalculateLocalAabb=true)
btMatrix3x3 scaled(const btVector3 &s) const
Create a scaled copy of the matrix.
SIMD_FORCE_INLINE const btScalar & getX() const
Return the x value.
virtual bool serialize(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) const
Data buffer MUST be 16 byte aligned.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE void btSwap(T &a, T &b)
#define btVector3DataName
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
SIMD_FORCE_INLINE long maxDot(const btVector3 *array, long array_count, btScalar &dotOut) const
returns index of maximum dot product between this and vectors in array[]
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
btAlignedObjectArray< btVector3 > vertices
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
vector project(vector v, vector v_proj)
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btVector3DoubleData * m_unscaledPointsDoublePtr
btVector3FloatData * m_unscaledPointsFloatPtr
btConvexInternalShapeData m_convexInternalShapeData