private static void ProcessResult(IndexedVector3[] triangleVerts, out IndexedVector3 aabbMin, out IndexedVector3 aabbMax, BvhTriangleMeshShape trimeshShape, int partId, int triangleIndex, TriangleInfoMap triangleInfoMap) { aabbMin = MathUtil.MAX_VECTOR; aabbMax = MathUtil.MIN_VECTOR; aabbMin.SetMin(ref triangleVerts[0]); aabbMax.SetMax(ref triangleVerts[0]); aabbMin.SetMin(ref triangleVerts[1]); aabbMax.SetMax(ref triangleVerts[1]); aabbMin.SetMin(ref triangleVerts[2]); aabbMax.SetMax(ref triangleVerts[2]); ConnectivityProcessor connectivityProcessor = new ConnectivityProcessor(); connectivityProcessor.m_partIdA = partId; connectivityProcessor.m_triangleIndexA = triangleIndex; connectivityProcessor.m_triangleVerticesA = triangleVerts; connectivityProcessor.m_triangleInfoMap = triangleInfoMap; trimeshShape.ProcessAllTriangles(connectivityProcessor, ref aabbMin, ref aabbMax); }