| 3528 | } |
| 3529 | |
| 3530 | Point3F ShapeBaseConvex::support(const VectorF& v) const |
| 3531 | { |
| 3532 | TSShape::ConvexHullAccelerator* pAccel = |
| 3533 | pShapeBase->mShapeInstance->getShape()->getAccelerator(pShapeBase->mDataBlock->collisionDetails[hullId]); |
| 3534 | AssertFatal(pAccel != NULL, "Error, no accel!"); |
| 3535 | |
| 3536 | F32 currMaxDP = mDot(pAccel->vertexList[0], v); |
| 3537 | U32 index = 0; |
| 3538 | for (U32 i = 1; i < pAccel->numVerts; i++) { |
| 3539 | F32 dp = mDot(pAccel->vertexList[i], v); |
| 3540 | if (dp > currMaxDP) { |
| 3541 | currMaxDP = dp; |
| 3542 | index = i; |
| 3543 | } |
| 3544 | } |
| 3545 | |
| 3546 | return pAccel->vertexList[index]; |
| 3547 | } |
| 3548 | |
| 3549 | |
| 3550 | void ShapeBaseConvex::getFeatures(const MatrixF& mat, const VectorF& n, ConvexFeature* cf) |
nothing calls this directly
no test coverage detected