Exemplo n.º 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;
        }
Exemplo n.º 2
0
        public void Create()
        {
            ObjAssetObjectFormat oformat = new ObjAssetObjectFormat();

            oformat.header = "o";
            oformat.name   = "default";
            this.AddObject(oformat);
            return;
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
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;
        }
Exemplo n.º 5
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;
        }