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; }
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; }