protected void PlotLine(Point start, Point end, Material material) { UpdateLimits(GetRelativeElements(start)); UpdateLimits(GetRelativeElements(end)); LinePlotter.Plot(parent, start, end, material, lineMesh, PlotUtils.FunctionRadius()); }
private void PlotBorder(List <Point> points) { for (int i = 1; i < points.Count; i++) { LinePlotter.Plot(parent, points[i - 1], points[i], lineMaterial, lineMesh, PlotUtils.FunctionRadius()); } LinePlotter.Plot(parent, points.Last(), points.First(), lineMaterial, lineMesh, PlotUtils.FunctionRadius()); }
private static void PlotMarks(GameObject parent, Material material, Mesh mesh, float radius, double markStart, double markEnd, double step, double proportion, Axis axis) { double min = step / 2; Debug.Log(markStart); Debug.Log(step); Debug.Log(markEnd); for (double i = markStart + step; i < markEnd; i += step) { if (i != 0 && (markEnd - i) > min) { LinePlotter.Plot(parent, MarkPoint(i, axis, proportion, true), MarkPoint(i, axis, proportion, false), material, mesh, radius); PlotLabel(parent, material, axis, proportion, i); } } }
private static void PlotAxis(GameObject parent, Material material, Mesh mesh, float radius, Interval i, Axis axis) { double proportion = 0.15 / PlotUtils.scale; double step = GetStep(i, proportion); Interval interval = AxisInterval(i, step); Point start = GetPoint(interval.a, axis); Point end = GetPoint(interval.b, axis); LinePlotter.Plot(parent, start, end, material, mesh, radius); ConePlotter.Plot(parent, start, GetPoint(interval.a - (arrowHeight * proportion), axis), arrowBaseScale, arrowPointScale, material); ConePlotter.Plot(parent, end, GetPoint(interval.b + (arrowHeight * proportion), axis), arrowBaseScale, arrowPointScale, material); PlotMarks(parent, material, mesh, radius, interval.a, interval.b, step, proportion, axis); }