public void CopyRange(Vector2I start, Vector2I end, MyCubemapData <T> other, Vector2I oStart, Vector2I oEnd) { Vector2I myStep = MyCubemapHelpers.GetStep(ref start, ref end); Vector2I oStep = MyCubemapHelpers.GetStep(ref oStart, ref oEnd); T val; for (; start != end; start += myStep, oStart += oStep) { other.GetValue(oStart.X, oStart.Y, out val); SetValue(start.X, start.Y, ref val); } other.GetValue(oStart.X, oStart.Y, out val); SetValue(start.X, start.Y, ref val); }
public void CopyRange(Vector2I start, Vector2I end, MyCubemapData <TPixel> other, Vector2I oStart, Vector2I oEnd) { TPixel local; Vector2I step = MyCubemapHelpers.GetStep(ref start, ref end); Vector2I vectori2 = MyCubemapHelpers.GetStep(ref oStart, ref oEnd); while (start != end) { other.GetValue(oStart.X, oStart.Y, out local); this.SetValue(start.X, start.Y, ref local); start += step; oStart += vectori2; } other.GetValue(oStart.X, oStart.Y, out local); this.SetValue(start.X, start.Y, ref local); }