|
Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
75 #ifdef TEST_INTERNAL_OBJECTS
113 int NbTris = numVertices;
114 for(
int j=0;j<NbTris;j++)
116 int k = (j+1)%numVertices;
154 #ifdef USE_CONNECTED_FACES
160 for(
int j=0;j<numVertices;j++)
162 int k = (j+1)%numVertices;
170 m_faces[i].m_connectedFaces[j] = connectedFace;
173 #endif//USE_CONNECTED_FACES
178 int NbTris = numVertices-2;
181 for(
int j=1;j<=NbTris;j++)
183 int k = (j+1)%numVertices;
197 #ifdef TEST_INTERNAL_OBJECTS
219 if(pt.
x()<MinX) MinX = pt.
x();
220 if(pt.
x()>MaxX) MaxX = pt.
x();
221 if(pt.
y()<MinY) MinY = pt.
y();
222 if(pt.
y()>MaxY) MaxY = pt.
y();
223 if(pt.
z()<MinZ) MinZ = pt.
z();
224 if(pt.
z()>MaxZ) MaxZ = pt.
z();
234 const btScalar Step = (
mE[LargestExtent]*0.5f - r)/1024.0f;
237 bool FoundBox =
false;
238 for(
int j=0;j<1024;j++)
256 const int e0 = (1<<LargestExtent) & 3;
257 const int e1 = (1<<e0) & 3;
259 for(
int j=0;j<1024;j++)
283 for(
int i=0;i<numVerts;i++)
301 btSwap(witnesPtMin,witnesPtMax);
bool testContainment() const
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...
btAlignedObjectArray< btFace > m_faces
int maxAxis() const
Return the axis with the largest value Note return values are 0,1,2 for x, y, or z.
btScalar dot(const btVector3 &v) const
Return the dot product.
const btScalar & y() const
Return the y value.
btAlignedObjectArray< btVector3 > m_vertices
The btHashMap template class implements a generic and lightweight hashmap.
btScalar btFabs(btScalar x)
void resize(int newsize, const T &fillData=T())
btInternalVertexPair(short int v0, short int v1)
virtual ~btConvexPolyhedron()
void project(const btTransform &trans, const btVector3 &dir, btScalar &minProj, btScalar &maxProj, btVector3 &witnesPtMin, btVector3 &witnesPtMax) const
btVector3 can be used to represent 3D points and vectors.
bool IsAlmostZero(const btVector3 &v)
const Value * find(const Key &key) const
const btScalar & x() const
Return the x value.
bool equals(const btInternalVertexPair &other) const
void insert(const Key &key, const Value &value)
btConvexPolyhedron()
This file was written by Erwin Coumans Separating axis rest based on work from Pierre Terdiman,...
void push_back(const T &_Val)
btScalar length(const btQuaternion &q)
Return the length of a quaternion.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
btAlignedObjectArray< btVector3 > m_uniqueEdges
const btScalar & z() const
Return the z value.
int size() const
return the number of elements in the array