public TestPoint ( Transform &transform, Vector2 &point ) : bool | ||
transform | Transform | The shape world transform. |
point | Vector2 | a point in world coordinates. |
return | bool |
public override bool TestPoint(ref Transform transform, ref Vector2 point)
{
Vector2 center = transform.Position + MathUtils.Multiply(ref transform.R, Position);
Vector2 d = point - center;
return Vector2.Dot(d, d) <= Radius*Radius;
}