public ViewBump(int x, int y, ViewBump parent) { X = x; Y = y; Parent = parent; }
public View(Line shallowLine, Line steepLine) { ShallowLine = shallowLine; SteepLine = steepLine; ShallowBump = null; SteepBump = null; }
private void AddSteepBump(int x, int y, List <View> activeViews, int viewIndex) { activeViews[viewIndex].SteepLine.End = new Vector2Int(x, y); activeViews[viewIndex].SteepBump = new ViewBump(x, y, activeViews[viewIndex].SteepBump); ViewBump currentBump = activeViews[viewIndex].ShallowBump; while (currentBump != null) { if (activeViews[viewIndex].SteepLine.Below(currentBump.X, currentBump.Y)) { activeViews[viewIndex].SteepLine.Begin = new Vector2Int(currentBump.X, currentBump.Y); } currentBump = currentBump.Parent; } }
private static void AddSteepBump(Vector2Int p, IList <View> activeViews, int viewIndex) { activeViews[viewIndex].SteepLine.xf = p.x; activeViews[viewIndex].SteepLine.yf = p.y; activeViews[viewIndex].SteepBump = new ViewBump(p, activeViews[viewIndex].SteepBump); ViewBump currentBump = activeViews[viewIndex].ShallowBump; while (currentBump != null) { if (activeViews[viewIndex].SteepLine.Below(currentBump.P)) { activeViews[viewIndex].SteepLine.xi = currentBump.P.x; activeViews[viewIndex].SteepLine.yi = currentBump.P.y; } currentBump = currentBump.Parent; } }
public ViewBump(Vector2Int p, ViewBump parent) { P = p; Parent = parent; }