36 if(fabsf(v.
x())>1e-6 || fabsf(v.
y())>1e-6 || fabsf(v.
z())>1e-6)
return false;
53 return m_v0+(m_v1<<16);
57 return m_v0==other.
m_v0 && m_v1==other.
m_v1;
74 #ifdef TEST_INTERNAL_OBJECTS 112 int NbTris = numVertices;
113 for(
int j=0;j<NbTris;j++)
115 int k = (j+1)%numVertices;
153 #ifdef USE_CONNECTED_FACES 159 for(
int j=0;j<numVertices;j++)
161 int k = (j+1)%numVertices;
169 m_faces[i].m_connectedFaces[j] = connectedFace;
172 #endif//USE_CONNECTED_FACES 177 int NbTris = numVertices-2;
180 for(
int j=1;j<=NbTris;j++)
182 int k = (j+1)%numVertices;
196 #ifdef TEST_INTERNAL_OBJECTS 218 if(pt.
x()<MinX) MinX = pt.
x();
219 if(pt.
x()>MaxX) MaxX = pt.
x();
220 if(pt.
y()<MinY) MinY = pt.
y();
221 if(pt.
y()>MaxY) MaxY = pt.
y();
222 if(pt.
z()<MinZ) MinZ = pt.
z();
223 if(pt.
z()>MaxZ) MaxZ = pt.
z();
233 const btScalar Step = (
mE[LargestExtent]*0.5f - r)/1024.0f;
236 bool FoundBox =
false;
237 for(
int j=0;j<1024;j++)
255 const int e0 = (1<<LargestExtent) & 3;
256 const int e1 = (1<<e0) & 3;
258 for(
int j=0;j<1024;j++)
282 for(
int i=0;i<numVerts;i++)
300 btSwap(witnesPtMin,witnesPtMax);
btAlignedObjectArray< btVector3 > m_vertices
btScalar length(const btQuaternion &q)
Return the length of a quaternion.
void push_back(const T &_Val)
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
bool equals(const btInternalVertexPair &other) const
const Value * find(const Key &key) const
btAlignedObjectArray< btVector3 > m_uniqueEdges
bool IsAlmostZero(const btVector3 &v)
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)
void project(const btTransform &trans, const btVector3 &dir, btScalar &minProj, btScalar &maxProj, btVector3 &witnesPtMin, btVector3 &witnesPtMax) const
bool testContainment() const
const btScalar & x() const
Return the x value.
btAlignedObjectArray< btFace > m_faces
btScalar dot(const btVector3 &v) const
Return the dot product.
btConvexPolyhedron()
This file was written by Erwin Coumans Separating axis rest based on work from Pierre Terdiman...
const btScalar & y() const
Return the y value.
const btScalar & z() const
Return the z value.
void insert(const Key &key, const Value &value)
virtual ~btConvexPolyhedron()
btVector3 can be used to represent 3D points and vectors.
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
int maxAxis() const
Return the axis with the largest value Note return values are 0,1,2 for x, y, or z.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar btFabs(btScalar x)