public static GetLocalMinkowskiExtremePoint ( |
||
shapeA | First shape. | |
shapeB | Second shape. | |
direction | System.Vector3 | Extreme point direction in local space. |
localTransformB | Transform of shapeB in the local space of A. | |
extremePoint | System.Vector3 | The extreme point in the local space of A. |
return | void |
public static void GetLocalMinkowskiExtremePoint(ConvexShape shapeA, ConvexShape shapeB, ref Vector3 direction, ref RigidTransform localTransformB, out Vector3 extremePoint)
{
//Extreme point of A-B along D = (extreme point of A along D) - (extreme point of B along -D)
shapeA.GetLocalExtremePointWithoutMargin(ref direction, out extremePoint);
Vector3 v;
Vector3 negativeN;
Vector3.Negate(ref direction, out negativeN);
shapeB.GetExtremePointWithoutMargin(negativeN, ref localTransformB, out v);
Vector3.Subtract(ref extremePoint, ref v, out extremePoint);
ExpandMinkowskiSum(shapeA.collisionMargin, shapeB.collisionMargin, ref direction, out v);
Vector3.Add(ref extremePoint, ref v, out extremePoint);
}
MinkowskiToolbox::GetLocalMinkowskiExtremePoint ( |
|
MinkowskiToolbox::GetLocalMinkowskiExtremePoint ( |