Пример #1
0
 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),
     });
 }
Пример #2
0
 public static Mesh Flatten(this WMOScene scene)
 {
     // ew
     return(scene.Terrain
            .Concat(scene.Doodads)
            .Concat(scene.Liquids)
            .OfType <Mesh>()
            .Flatten(MeshType.WorldModelObject));
 }
Пример #3
0
 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);
     }
 }