23btConvexPolyhedron::btConvexPolyhedron()
26btConvexPolyhedron::~btConvexPolyhedron()
70#ifdef TEST_INTERNAL_OBJECTS
71bool btConvexPolyhedron::testContainment()
const
73 for (
int p = 0; p < 8; p++)
105void btConvexPolyhedron::initialize()
113 for (
int j = 0; j < NbTris; j++)
153#ifdef USE_CONNECTED_FACES
168 int connectedFace = (edptr->
m_face0 ==
i) ? edptr->
m_face1 : edptr->m_face0;
169 m_faces[
i].m_connectedFaces[j] = connectedFace;
177void btConvexPolyhedron::initialize2()
187 for (
int j = 1; j <= NbTris; j++)
192 btScalar Area = ((p0 - p1).cross(p0 - p2)).length() * 0.5f;
200#ifdef TEST_INTERNAL_OBJECTS
221 if (pt.x() < MinX) MinX = pt.x();
222 if (pt.x() > MaxX) MaxX = pt.x();
223 if (pt.y() < MinY) MinY = pt.y();
224 if (pt.y() > MaxY) MaxY = pt.y();
225 if (pt.z() < MinZ) MinZ = pt.z();
226 if (pt.z() > MaxZ) MaxZ = pt.z();
228 mC.setValue(MaxX + MinX, MaxY + MinY, MaxZ + MinZ);
229 mE.setValue(MaxX - MinX, MaxY - MinY, MaxZ - MinZ);
233 const int LargestExtent =
mE.maxAxis();
234 const btScalar Step = (
mE[LargestExtent] * 0.5f - r) / 1024.0f;
236 m_extents[LargestExtent] =
mE[LargestExtent] * 0.5f;
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++)
282 for (
int i = 0;
i < numVerts;
i++)
297 if (minProj > maxProj)
300 btSwap(witnesPtMin, witnesPtMax);
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
bool IsAlmostZero1(const btVector3 &v)
bool testContainment() const
btAlignedObjectArray< btFace > m_faces
btAlignedObjectArray< btVector3 > m_uniqueEdges
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE btScalar btFabs(btScalar x)
SIMD_FORCE_INLINE void btSwap(T &a, T &b)
btAlignedObjectArray< unsigned int > m_indices
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
void insert(const Key &key, const Value &value)
const Value * find(const Key &key) const
btInternalVertexPair(short int v0, short int v1)
bool equals(const btInternalVertexPair &other) const