ComputeSweepRadius() public method

Get the maximum radius about the parent body's center of mass.
public ComputeSweepRadius ( Vector2 pivot ) : float
pivot Vector2
return float
Exemplo n.º 1
0
        public float ComputeTOI(Sweep sweepA, Sweep sweepB)
        {
            TOIInput input = new TOIInput();

            input.SweepA       = sweepA;
            input.SweepB       = sweepB;
            input.SweepRadiusA = _fixtureA.ComputeSweepRadius(sweepA.LocalCenter);
            input.SweepRadiusB = _fixtureB.ComputeSweepRadius(sweepB.LocalCenter);
            input.Tolerance    = Common.Settings.LinearSlop;

            return(Collision.Collision.TimeOfImpact(input, _fixtureA.Shape, _fixtureB.Shape));
        }