void UpdatePoints() { mLinePrimitive.ClearVectors(); float width = mColumnWidth * mColumnCount; float height = mRowWidth * mRowCount; float currentY = 0; for (int i = 0; i < mRowCount + 1; i++) { currentY = i * mRowWidth; mLinePrimitive.Add(0, currentY); mLinePrimitive.Add(width, currentY); } float currentX = 0; for (int i = 0; i < mColumnCount + 1; i++) { currentX = i * mColumnWidth; mLinePrimitive.Add(currentX, 0); mLinePrimitive.Add(currentX, height); } }
public void SetPoints(ICollection <Vector2> points) { mLinePrimitive.ClearVectors(); if (points != null) { foreach (var point in points) { mLinePrimitive.Add(point); } } }