static void ReadWDT() { string path = string.Format(@"World\Maps\{0}\{0}.wdt", "WailingCaverns"); var sw = Stopwatch.StartNew(); var wdt = new WDT(path); Console.WriteLine("Loaded {0} chunks from '{1}' in {2}ms", wdt.Data.Chunks.Count, System.IO.Path.GetFileName(path), sw.ElapsedMilliseconds); wdt.GenerateGlobalModel(); sw.Stop(); var geom = new Geometry(); geom.AddWDTGlobalmodel(wdt); geom.SaveWavefrontObject("WailingCaverns.obj"); }
public void Generate(WDT wdt) { if (!wdt.IsGlobalModel) { return; } wdt.GenerateGlobalModel(); // Terrain AddMeshRenderer(wdt.ModelScene.Terrain); // Doodads AddMeshRenderer(wdt.ModelScene.Doodads); // Liquids AddMeshRenderer(wdt.ModelScene.Liquids); }