Esempio n. 1
0
        private void CreateBoneLineNode(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];
                var     model = new NodeLineModel(mesh.Skeleton.Bones);
                var     node  = NodeLineNode.Create(model);
                rootElement.Children.Add(node);
            }
        }
Esempio n. 2
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);
                }
            }
        }