15#if defined(_WIN32) || defined(__i386__)
16#define BT_USE_SSE_IN_API
99#ifndef BT_RECONSTRUCT_FACES
101 int numVertices =
conv.vertices.size();
103 for (
int p = 0; p < numVertices; p++)
109 for (
int j = 0;
j <
conv.faces.size();
j++)
118 v1 =
edge->getTargetVertex();
132 int v01 =
edge->getSourceVertex();
133 v1 =
edge->getTargetVertex();
169 int numVertices =
convexUtil->vertices.size();
171 for (
int p = 0; p < numVertices; p++)
189 int src =
edge->getSourceVertex();
220 for (
int v = 0; v <
tmpFaces[i].m_indices.size(); v++)
235 for (
int i = 0; i <
tmpFaces.size(); i++)
282 for (
int i = 0; i <
orgpoints.size(); i++)
297 for (
int i = 0; i < 4; i++)
305 for (
int i = 0; i <
hull.size(); i++)
321 for (
int i = 0; i <
orgpoints.size(); i++)
383#define MIN(_a, _b) ((_a) < (_b) ? (_a) : (_b))
397 vec.setValue(1, 0, 0);
494 m_localAabbMin(1, 1, 1),
495 m_localAabbMax(-1, -1, -1),
496 m_isLocalAabbValid(
false)
530 for (
int i = 0; i < 3; ++i)
538 for (
int i = 0; i < 3; i++)
#define btAlignedFree(ptr)
#define btAlignedAlloc(size, alignment)
void GrahamScanConvexHull2D(btAlignedObjectArray< GrahamVector3 > &originalPoints, btAlignedObjectArray< GrahamVector3 > &hull, const btVector3 &normalAxis)
const T & btMax(const T &a, const T &b)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar btSqrt(btScalar y)
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
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)
int getSourceVertex() const
Convex hull implementation based on Preparata and Hong See http://code.google.com/p/bullet/issues/det...
The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
btScalar m_collisionMargin
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const
void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicat...
virtual void setLocalScaling(const btVector3 &scaling)
virtual btScalar getMargin() const
btAlignedObjectArray< btVector3 > m_vertices
virtual ~btConvexPolyhedron()
btAlignedObjectArray< btFace > m_faces
static void getVerticesFromPlaneEquations(const btAlignedObjectArray< btVector3 > &planeEquations, btAlignedObjectArray< btVector3 > &verticesOut)
static void getPlaneEquationsFromVertices(btAlignedObjectArray< btVector3 > &vertices, btAlignedObjectArray< btVector3 > &planeEquationsOut)
btPolyhedralConvexAabbCachingShape()
virtual void setLocalScaling(const btVector3 &scaling)
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicat...
void getNonvirtualAabb(const btTransform &trans, btVector3 &aabbMin, btVector3 &aabbMax, btScalar margin) const
The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
btPolyhedralConvexShape()
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
virtual ~btPolyhedralConvexShape()
virtual bool initializePolyhedralFeatures(int shiftVerticesByMargin=0)
optional method mainly used to generate multiple contact points by clipping polyhedral features (face...
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
virtual void getVertex(int i, btVector3 &vtx) const =0
virtual void setPolyhedralFeatures(btConvexPolyhedron &polyhedron)
btConvexPolyhedron * m_polyhedron
virtual int getNumVertices() const =0
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
btVector3 can be used to represent 3D points and vectors.
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
btScalar length2() const
Return the length of the vector squared.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
const btScalar & getX() const
Return the x value.
btAlignedObjectArray< int > m_indices