コード例 #1
0
        public override string DebugInfo()
        {
            string st = ToString();

            if (HasData())
            {
                BinBVHAnimationReader r = Reader;
                AddName(r.ExpressionName);

                SortedDictionary <JointMoveSize, JointMoveSize> stuff = new SortedDictionary <JointMoveSize, JointMoveSize>();

                foreach (var c in r.joints)
                {
                    // Torso shall cover it
                    if (c.Name == "mPelvis")
                    {
                        continue;
                    }
                    JointMoveSize js = new JointMoveSize(c);
                    stuff[js] = js;
                }
                foreach (var c in stuff.Values)
                {
                    st += " " + c.ToString();
                }
            }
            return(st);
        }
コード例 #2
0
        private void AnalyzeType()
        {
            if (!HasData())
            {
                return;
            }
            BinBVHAnimationReader r = _reader;

            //lock (SimAssetStore.SimAssets)
            foreach (SimAsset animation in SimAssetStore.SimAssets)
            {
                if (animation == this)
                {
                    continue;
                }
                if (!animation.HasData())
                {
                    continue;
                }
                if (SameAsset(animation))
                {
                    WriteLine("Found dup " + animation);
                    foreach (string name in animation._NamesList)
                    {
                        AddName(name + "_" + AssetID);
                    }
                    foreach (string meaning in animation.Meanings)
                    {
                        AddType(meaning);
                    }
                    return;
                }
            }
        }
コード例 #3
0
        protected override string GuessAssetName()
        {
            BinBVHAnimationReader bvh = Reader;

            if (bvh != null && !string.IsNullOrEmpty(bvh.ExpressionName))
            {
                string n = bvh.ExpressionName;
                _NamesList.Add(n);
                return(n);
            }
            return(UnknownName);
        }
コード例 #4
0
 public bool SameAnims(BinBVHAnimationReader bvh1, BinBVHAnimationReader bvh2)
 {
     if (bvh1 == bvh2)
     {
         return(true);
     }
     if (bvh1.joints.Length != bvh2.joints.Length)
     {
         return(false);
     }
     if (bvh1.Loop != bvh2.Loop)
     {
         return(false);
     }
     return(false);
 }
コード例 #5
0
 protected override List <SimAsset> GetParts()
 {
     try
     {
         _reader = new BinBVHAnimationReader(AssetData);
         AnalyzeType();
     }
     catch (System.Exception ex)
     {
         WriteLine("" + ex);
         //_TypeData = null;
     }
     return(new List <SimAsset>()
     {
         this
     });
 }