示例#1
0
        public Clipmap()
        {
            //_testMap = (Bitmap)Image.FromFile("height.png");
            _testMap = (Bitmap)Image.FromFile(@"height.jpg");


            //Position = new IntFloatVector2(new IntFloat(-_testMap.Width / 4), new IntFloat(-_testMap.Height / 4));

            Locations = new PatchLocations(H, M);

            ClipmapLevel parent = null;

            for (var i = Levels - 1; i >= 0; i--)
            {
                _levels[i] = new ClipmapLevel(i, Scale, this, parent);
                parent     = _levels[i];
            }

            GenerateTestTexture();
            ActiveMin = 0;
            ActiveMax = Levels;
            UpdatePosition();
            Reset();

            _initialized = true;
        }
示例#2
0
        public Clipmap()
        {
            //_testMap = (Bitmap)Image.FromFile("height.png");
            _testMap = (Bitmap)Image.FromFile(@"height.jpg");

            Position = new IntFloatVector2(new IntFloat(-_testMap.Width / 4), new IntFloat(-_testMap.Height / 4));

            Locations = new PatchLocations(H, M);

            var scale = Scale;
            var scaleInt = 1;

            for (var i = 0; i < Levels; i++)
            {
                _levels[i] = new ClipmapLevel(scale, scaleInt, this);
                scale *= 2.0f;
                scaleInt *= 2;
            }

            GenerateTestTexture();
            UpdatePosition();
            Reset();

            _initialized = true;
        }
示例#3
0
        public Clipmap()
        {
            //_testMap = (Bitmap)Image.FromFile("height.png");
            _testMap = (Bitmap)Image.FromFile(@"height.jpg");

            //Position = new IntFloatVector2(new IntFloat(-_testMap.Width / 4), new IntFloat(-_testMap.Height / 4));

            Locations = new PatchLocations(H, M);

            ClipmapLevel parent = null;
            for (var i = Levels - 1; i >= 0; i--)
            {
                _levels[i] = new ClipmapLevel(i, Scale, this, parent);
                parent = _levels[i];
            }

            GenerateTestTexture();
            ActiveMin = 0;
            ActiveMax = Levels;
            UpdatePosition();
            Reset();

            _initialized = true;
        }