示例#1
0
        public void AddPolygonFace(ObjAssetPolygonFaceFormat fformat)
        {
            string path = this.GetLastGroupPath();

            if (false == this.fDictionary.ContainsKey(path))
            {
                List <ObjAssetPolygonFaceFormat> fformatList = new List <ObjAssetPolygonFaceFormat>();
                fformatList.Add(fformat);
                this.fDictionary.Add(path, fformatList);
            }
            else
            {
                List <ObjAssetPolygonFaceFormat> fformatList = this.fDictionary[path];
                fformatList.Add(fformat);
            }
            int lastIndex = this.oList.Count - 1;
            ObjAssetObjectFormat       oformat     = this.oList[lastIndex];
            List <ObjAssetGroupFormat> gformatList = this.gDictionary[oformat.name];

            lastIndex = gformatList.Count - 1;
            ObjAssetGroupFormat gformat = gformatList[lastIndex];

            gformat.polygonFaceCount += fformat.indexList.Count;
            return;
        }
示例#2
0
        private string GetLastGroupPath()
        {
            int lastIndex = this.oList.Count - 1;
            ObjAssetObjectFormat       oformat     = this.oList[lastIndex];
            List <ObjAssetGroupFormat> gformatList = this.gDictionary[oformat.name];

            lastIndex = gformatList.Count - 1;
            ObjAssetGroupFormat gformat = gformatList[lastIndex];
            string path = Path.Combine(oformat.name, gformat.name);

            return(path);
        }
示例#3
0
        public void AddObject(ObjAssetObjectFormat oformat)
        {
            this.oList.Add(oformat);
            ObjAssetGroupFormat gformat = new ObjAssetGroupFormat();

            gformat.header = "g";
            gformat.name   = "default";
            List <ObjAssetGroupFormat> gformatList = new List <ObjAssetGroupFormat>();

            gformatList.Add(gformat);
            this.gDictionary.Add(oformat.name, gformatList);
            return;
        }
示例#4
0
        public void AddGroup(ObjAssetGroupFormat gformat)
        {
            int lastIndex = this.oList.Count - 1;
            ObjAssetObjectFormat oformat = this.oList[lastIndex];

            if (false == this.gDictionary.ContainsKey(oformat.name))
            {
                List <ObjAssetGroupFormat> gformatList = new List <ObjAssetGroupFormat>();
                gformatList.Add(gformat);
                this.gDictionary.Add(oformat.name, gformatList);
            }
            else
            {
                List <ObjAssetGroupFormat> gformatList = this.gDictionary[oformat.name];
                gformatList.Add(gformat);
            }
            return;
        }