Exemple #1
0
        static void ReadADT()
        {
            var adt = new ADT("Azeroth", 32, 48);
            //var adt = new ADT("Kalimdor", 32, 36);
            adt.Read();

            var geom = new Geometry();
            geom.Transform = true;
            geom.AddADT(adt);
            geom.SaveWavefrontObject(Path.GetFileNameWithoutExtension(adt.Filename) + ".obj");
            WoWMap.Builders.ContinentBuilder b = new WoWMap.Builders.ContinentBuilder("Azeroth", 32, 48,1,1);
            b.Build();
        }
Exemple #2
0
        static void ReadADTs()
        {
            const string continent = "Azeroth";
            var allGeom = new Geometry();

            var sw = new Stopwatch();
            for (int y = 49; y < 50; y++)
            {
                for (int x = 31; x < 33; x++)
                {
                    Console.Write("Parsing {0} [{1}, {2}]", continent, x, y);
                    sw.Start();
                    var adt = new ADT(continent, x, y);
                    adt.Read();
                    sw.Reset();
                    Console.WriteLine(" (done! {0}ms)", sw.ElapsedMilliseconds);
                    allGeom.AddADT(adt);
                }
            }

            allGeom.SaveWavefrontObject(continent + ".obj");
        }
Exemple #3
0
        static void CreateNavmesh()
        {
            var geom = new Geometry();
            var sw = Stopwatch.StartNew();
            var adt = new ADT("Azeroth", 28, 28);
            adt.Read();
            sw.Stop();
            Console.WriteLine("Read ADT in {0}", sw.Elapsed);
            geom.AddADT(adt);
            sw.Restart();
           // var bbox = Geometry.GetBoundingBox(28, 28, geom.Vertices);
           // var build = geom.GenerateNavmesh(bbox);
            sw.Stop();
            Console.WriteLine("Generated navmesh in {0}", sw.Elapsed);

            //TestNavmesh(new SharpNav.TiledNavMesh(build));
        }