54 return m_v0+(m_v1<<16);
58 return m_v0==other.
m_v0 && m_v1==other.
m_v1;
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 185 int NbTris = numVertices-2;
188 for(
int j=1;j<=NbTris;j++)
190 int k = (j+1)%numVertices;
204 #ifdef TEST_INTERNAL_OBJECTS 226 if(pt.
x()<MinX) MinX = pt.
x();
227 if(pt.
x()>MaxX) MaxX = pt.
x();
228 if(pt.
y()<MinY) MinY = pt.
y();
229 if(pt.
y()>MaxY) MaxY = pt.
y();
230 if(pt.
z()<MinZ) MinZ = pt.
z();
231 if(pt.
z()>MaxZ) MaxZ = pt.
z();
241 const btScalar Step = (
mE[LargestExtent]*0.5f - r)/1024.0f;
244 bool FoundBox =
false;
245 for(
int j=0;j<1024;j++)
263 const int e0 = (1<<LargestExtent) & 3;
264 const int e1 = (1<<e0) & 3;
266 for(
int j=0;j<1024;j++)
289 for(
int i=0;i<numVerts;i++)
307 btSwap(witnesPtMin,witnesPtMax);
btAlignedObjectArray< btVector3 > m_vertices
btScalar length(const btQuaternion &q)
Return the length of a quaternion.
void push_back(const T &_Val)
bool equals(const btInternalVertexPair &other) const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
btAlignedObjectArray< btVector3 > m_uniqueEdges
bool IsAlmostZero(const btVector3 &v)
btScalar dot(const btVector3 &v) const
Return the dot product.
The btHashMap template class implements a generic and lightweight hashmap.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
btInternalVertexPair(short int v0, short int v1)
const btScalar & x() const
Return the x value.
int size() const
return the number of elements in the array
btAlignedObjectArray< btFace > m_faces
btConvexPolyhedron()
This file was written by Erwin Coumans Separating axis rest based on work from Pierre Terdiman...
void insert(const Key &key, const Value &value)
virtual ~btConvexPolyhedron()
const btScalar & y() const
Return the y value.
btVector3 can be used to represent 3D points and vectors.
const Value * find(const Key &key) const
void resize(int newsize, const T &fillData=T())
bool testContainment() const
void project(const btTransform &trans, const btVector3 &dir, btScalar &minProj, btScalar &maxProj, btVector3 &witnesPtMin, btVector3 &witnesPtMax) const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
int maxAxis() const
Return the axis with the largest value Note return values are 0,1,2 for x, y, or z.
btScalar btFabs(btScalar x)
const btScalar & z() const
Return the z value.