Пример #1
0
        private void CreateTextureNode(string filename)
        {
            EZMFile ezmFile = EZMFile.Load(filename);

            ezmFile.LoadTextures();
            var rootElement = this.scene.RootNode;

            for (int i = 0; i < ezmFile.MeshSystem.Meshes.Length; i++)
            {
                EZMMesh      mesh      = ezmFile.MeshSystem.Meshes[i];
                EZMAnimation animation = ezmFile.MeshSystem.Animations.Length > 0 ? ezmFile.MeshSystem.Animations[0] : null;
                var          container = new EZMVertexBufferContainer(mesh, animation);
                for (int j = 0; j < mesh.MeshSections.Length; j++)
                {
                    var model = new EZMTextureModel(container, mesh.MeshSections[j]);
                    var node  = EZMTextureNode.Create(model);
                    rootElement.Children.Add(node);
                }
            }
        }
Пример #2
0
 public EZMTextureModel(EZMVertexBufferContainer container, EZMMeshSection section)
 {
     this.container = container;
     this.section   = section;
 }