private void DrawBounds(IBounded bounds, float thickness) { foreach (Line v in bounds.GetLines()) { DrawLine(v, thickness); } }
public static List <Intersection> GetIntersections(IBounded bounds1, IBounded bounds2) { List <Intersection> intersections = new List <Intersection>(); foreach (Line line in bounds1.GetLines()) { intersections.AddRange(GetIntersections(line, bounds2)); } return(intersections); }
// INTERSECTION public static bool HasIntersection(IBounded bounds1, IBounded bounds2) { foreach (Line line in bounds1.GetLines()) { if (HasIntersection(line, bounds2)) { return(true); } } return(false); }
public static List <Intersection> GetIntersections(Line line, IBounded bounds) { List <Intersection> intersections = new List <Intersection>(); foreach (Line otherLine in bounds.GetLines()) { Intersection intersection = GetIntersection(line, otherLine); if (intersection != null) { intersections.Add(intersection); } } return(intersections); }
public static bool HasIntersection(Line line, IBounded bounds) { List <Vector2> intersections = new List <Vector2>(); foreach (Line otherLine in bounds.GetLines()) { Intersection intersection = GetIntersection(line, otherLine); if (intersection != null) { return(true); } } return(false); }