Box2D.Collision.Shapes.CircleShape.TestPoint C# (CSharp) Méthode

TestPoint() public méthode

public TestPoint ( Transform transform, Vec2 p ) : bool
transform Box2D.Common.Transform
p Box2D.Common.Vec2
Résultat bool
        public override bool TestPoint(Transform transform, Vec2 p)
        {
            Vec2 center = pool1;
            Rot.MulToOutUnsafe(transform.Q, P, center);
            center.AddLocal(transform.P);

            Vec2 d = center.SubLocal(p).NegateLocal();
            return Vec2.Dot(d, d) <= Radius * Radius;
        }