Differential D1739 Diff 5899 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
Changeset View
Changeset View
Standalone View
Standalone View
extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
| Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static int gActualSATPairTests=0; | static int gActualSATPairTests=0; | ||||
| inline bool IsAlmostZero(const btVector3& v) | inline bool IsAlmostZero(const btVector3& v) | ||||
| { | { | ||||
| if(fabsf(v.x())>1e-6 || fabsf(v.y())>1e-6 || fabsf(v.z())>1e-6) return false; | if(btFabs(v.x())>1e-6 || btFabs(v.y())>1e-6 || btFabs(v.z())>1e-6) return false; | ||||
| return true; | return true; | ||||
| } | } | ||||
| #ifdef TEST_INTERNAL_OBJECTS | #ifdef TEST_INTERNAL_OBJECTS | ||||
| inline void BoxSupport(const btScalar extents[3], const btScalar sv[3], btScalar p[3]) | inline void BoxSupport(const btScalar extents[3], const btScalar sv[3], btScalar p[3]) | ||||
| { | { | ||||
| // This version is ~11.000 cycles (4%) faster overall in one of the tests. | // This version is ~11.000 cycles (4%) faster overall in one of the tests. | ||||
| ▲ Show 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | #endif | ||||
| } | } | ||||
| } | } | ||||
| btVector3 edgeAstart,edgeAend,edgeBstart,edgeBend; | btVector3 edgeAstart,edgeAend,edgeBstart,edgeBend; | ||||
| int edgeA=-1; | int edgeA=-1; | ||||
| int edgeB=-1; | int edgeB=-1; | ||||
| btVector3 worldEdgeA; | btVector3 worldEdgeA; | ||||
| btVector3 worldEdgeB; | btVector3 worldEdgeB; | ||||
| btVector3 witnessPointA,witnessPointB; | btVector3 witnessPointA(0,0,0),witnessPointB(0,0,0); | ||||
| int curEdgeEdge = 0; | int curEdgeEdge = 0; | ||||
| // Test edges | // Test edges | ||||
| for(int e0=0;e0<hullA.m_uniqueEdges.size();e0++) | for(int e0=0;e0<hullA.m_uniqueEdges.size();e0++) | ||||
| { | { | ||||
| const btVector3 edge0 = hullA.m_uniqueEdges[e0]; | const btVector3 edge0 = hullA.m_uniqueEdges[e0]; | ||||
| const btVector3 WorldEdge0 = transA.getBasis() * edge0; | const btVector3 WorldEdge0 = transA.getBasis() * edge0; | ||||
| ▲ Show 20 Lines • Show All 246 Lines • Show Last 20 Lines | |||||