Exemple #1
0
        public bool Process(System.IO.Stream input, GeometryDataContainer gmdc, bool animationonly)
        {
            System.IO.StreamReader       sr  = new StreamReader(input);
            Ambertation.XSI.IO.AsciiFile xsi = Ambertation.XSI.IO.AsciiFile.FromStream(sr, FileName);

            GenericMeshImport gmi = new GenericMeshImport(xsi.ToScene(), gmdc, Component);

            return(gmi.Run());
        }
Exemple #2
0
        /// <summary>
        /// Called when a new File is started
        /// </summary>
        /// <remarks>
        /// you should use this to write Header Informations.
        /// Use the writer member to write to the File
        /// </remarks>
        protected override void InitFile()
        {
            string name = System.IO.Path.GetFileNameWithoutExtension(this.FileName);
            string path = System.IO.Path.GetDirectoryName(this.FileName);

            path = System.IO.Path.Combine(path, name + ".IMG");


            GeometryDataContainerExt gext = new GeometryDataContainerExt(Gmdc);

            Ambertation.Scenes.Scene scn = gext.GetScene(this.Groups, path, name + ".IMG", this.Component);

            Ambertation.XSI.IO.AsciiFile xsi = Ambertation.XSI.IO.AsciiFile.FromScene(scn, FileName);
            xsi.SaveToStream(this.writer);
        }