public Program() : base(1024, 768) { scene = new Scene3D(); InitCamera(); glEnables(); FontInit(); alm = new AsyncLoadingManager(ref scene, pathToModels + ".zs", pathToModels + ".mtl"); //camera.Location = new Vector3(scene.bounds.minX + scene.bounds.maxX/2, 0.0f, scene.bounds.minZ + scene.bounds.maxZ/2); int val = scene.CalculZone(camera.Location, splitSize); if (val != precZone) { Console.Write("zone " + val + "\n"); } precZone = val; Console.WriteLine(scene.bounds.minX + " " + scene.bounds.maxX + " " + scene.bounds.minZ + " " + scene.bounds.maxZ); precZone = 0; }
public Program() : base(1024, 768) { scene = new Scene3D(); InitCamera(); glEnables(); FontInit(); alm = new AsyncLoadingManager(ref scene, pathToModels +".zs", pathToModels + ".mtl"); //camera.Location = new Vector3(scene.bounds.minX + scene.bounds.maxX/2, 0.0f, scene.bounds.minZ + scene.bounds.maxZ/2); int val = scene.CalculZone(camera.Location, splitSize); if(val != precZone) { Console.Write("zone " + val + "\n"); } precZone = val; Console.WriteLine(scene.bounds.minX + " " + scene.bounds.maxX + " " + scene.bounds.minZ + " " + scene.bounds.maxZ); precZone = 0; }
private void UpdateZones() { List <int> loadList; lock (scene.access){ currentZones = new Zone[scene.zones.Count]; scene.zones.Values.CopyTo(currentZones, 0); loadList = scene.CalculListZone(camera.Location, splitSize, radius); } int val = scene.CalculZone(camera.Location, splitSize); if (val != precZone) { Console.Write("zone " + val + "\n"); Console.WriteLine(camera.Location.X + " " + camera.Location.Z); alm.Load = loadList; } precZone = val; }