MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / support

Method support

Engine/source/T3D/shapeBase.cpp:3371–3388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3369}
3370
3371Point3F 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
3391void ShapeBaseConvex::getFeatures(const MatrixF& mat, const VectorF& n, ConvexFeature* cf)

Callers

nothing calls this directly

Calls 3

getAcceleratorMethod · 0.80
mDotFunction · 0.50
getShapeMethod · 0.45

Tested by

no test coverage detected