Exemple #1
0
        public void CopyRange(Vector2I start, Vector2I end, MyHeightmapFace other, Vector2I oStart, Vector2I oEnd)
        {
            Vector2I myStep = MyCubemapHelpers.GetStep(ref start, ref end);
            Vector2I oStep  = MyCubemapHelpers.GetStep(ref oStart, ref oEnd);
            ushort   val;

            for (; start != end; start += myStep, oStart += oStep)
            {
                other.GetValue(oStart.X, oStart.Y, out val);
                SetValue(start.X, start.Y, val);
            }

            other.GetValue(oStart.X, oStart.Y, out val);
            SetValue(start.X, start.Y, val);
        }
Exemple #2
0
        public void CopyRange(Vector2I start, Vector2I end, MyHeightmapFace other, Vector2I oStart, Vector2I oEnd)
        {
            ushort   num;
            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 num);
                this.SetValue(start.X, start.Y, num);
                start  += step;
                oStart += vectori2;
            }
            other.GetValue(oStart.X, oStart.Y, out num);
            this.SetValue(start.X, start.Y, num);
        }