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

Method support

Engine/source/T3D/shapeBase.cpp:3530–3547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3528}
3529
3530Point3F 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
3550void 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