| 3369 | } |
| 3370 | |
| 3371 | Point3F ShapeBaseConvex::support(const VectorF& v) const |
| 3372 | { |
| 3373 | TSShape::ConvexHullAccelerator* pAccel = |
| 3374 | pShapeBase->mShapeInstance->getShape()->getAccelerator(pShapeBase->mDataBlock->collisionDetails[hullId]); |
| 3375 | AssertFatal(pAccel != NULL, "Error, no accel!"); |
| 3376 | |
| 3377 | F32 currMaxDP = mDot(pAccel->vertexList[0], v); |
| 3378 | U32 index = 0; |
| 3379 | for (U32 i = 1; i < pAccel->numVerts; i++) { |
| 3380 | F32 dp = mDot(pAccel->vertexList[i], v); |
| 3381 | if (dp > currMaxDP) { |
| 3382 | currMaxDP = dp; |
| 3383 | index = i; |
| 3384 | } |
| 3385 | } |
| 3386 | |
| 3387 | return pAccel->vertexList[index]; |
| 3388 | } |
| 3389 | |
| 3390 | |
| 3391 | void ShapeBaseConvex::getFeatures(const MatrixF& mat, const VectorF& n, ConvexFeature* cf) |
nothing calls this directly
no test coverage detected