Exemple #1
0
 public override void Dump()
 {
     Debug.Log(string.Format("f::{0}", this.fDictionary.Count));
     Debug.Log(string.Format("g::{0}", this.gDictionary.Count));
     Debug.Log(string.Format("mtllib::{0}", this.mtllibList.Count));
     Debug.Log(string.Format("o::{0}", this.oList.Count));
     Debug.Log(string.Format("usemtl::{0}", this.usemtlDictionary.Count));
     Debug.Log(string.Format("v::{0}", this.vList.Count));
     Debug.Log(string.Format("vt::{0}", this.vtList.Count));
     Debug.Log(string.Format("vn::{0}", this.vnList.Count));
     Debug.Log(string.Format("allfcount::{0}", this.GetAllPolygonFacesCount()));
     foreach (string objectName in this.gDictionary.Keys)
     {
         List <ObjAssetGroupFormat> glist = this.gDictionary[objectName];
         Debug.Log(string.Format("objectName::{0},in g count::{1}", objectName, glist.Count));
     }
     foreach (string key in this.fDictionary.Keys)
     {
         int count = 0;
         List <ObjAssetPolygonFaceFormat> flist = this.fDictionary[key];
         foreach (ObjAssetPolygonFaceFormat f in flist)
         {
             count += f.indexList.Count;
         }
         Debug.Log(string.Format("groupName::{0},in f count::{1}", key, count));
     }
     foreach (string key in this.usemtlDictionary.Keys)
     {
         ObjAssetUseMaterialFormat usemtlFormat = this.usemtlDictionary[key];
         Debug.Log(string.Format("groupName::{0},usemtlName::{1}", key, usemtlFormat.name));
     }
     return;
 }
Exemple #2
0
        public void AddUseMaterial(ObjAssetUseMaterialFormat usemtlFormat)
        {
            string path = this.GetLastGroupPath();

            if (false == this.usemtlDictionary.ContainsKey(path))
            {
                this.usemtlDictionary.Add(path, usemtlFormat);
            }
            return;
        }