public static WMOScene Transform(this WMOScene scene, Matrix4 mat) { return(new WMOScene { Terrain = scene.Terrain.OfType <Mesh>().Transform(mat), Doodads = scene.Doodads.OfType <Mesh>().Transform(mat), Liquids = scene.Liquids.OfType <Mesh>().Transform(mat), }); }
public static Mesh Flatten(this WMOScene scene) { // ew return(scene.Terrain .Concat(scene.Doodads) .Concat(scene.Liquids) .OfType <Mesh>() .Flatten(MeshType.WorldModelObject)); }
public void AddWMOScene(WMOScene wmosecene, bool transform = true) { foreach (var mesh in wmosecene.Terrain) { AddMesh(mesh, transform); } foreach (var mesh in wmosecene.Doodads) { AddMesh(mesh, transform); } foreach (var mesh in wmosecene.Liquids) { AddMesh(mesh, transform); } }