virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) { (void)partId; (void)triangleIndex; m_aabbMin.setMin(triangle[0]); m_aabbMax.setMax(triangle[0]); m_aabbMin.setMin(triangle[1]); m_aabbMax.setMax(triangle[1]); m_aabbMin.setMin(triangle[2]); m_aabbMax.setMax(triangle[2]); }
void btBU_Simplex1to4::getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const { #if 1 btPolyhedralConvexAabbCachingShape::getAabb(t, aabbMin, aabbMax); #else aabbMin.setValue(BT_LARGE_FLOAT, BT_LARGE_FLOAT, BT_LARGE_FLOAT); aabbMax.setValue(-BT_LARGE_FLOAT,-BT_LARGE_FLOAT,-BT_LARGE_FLOAT); //just transform the vertices in worldspace, and take their AABB for (int i=0;i<m_numVertices;i++) { btVector3 worldVertex = t(m_vertices[i]); aabbMin.setMin(worldVertex); aabbMax.setMax(worldVertex); } #endif }