Exemplo n.º 1
0
        public bool LoadFromStream(NullMemoryStream stream)
        {
            bool res = stream.ReadInt(out mParent);

            res &= stream.ReadList(out mPosArray);
            res &= stream.ReadList(out mQuatArray, GetFrameCount());
            res &= stream.ReadString(out mBoneName);
            return(res);
        }
        public bool LoadFromStream(NullMemoryStream stream)
        {
            byte b;
            bool res = stream.ReadByte(out b);

            res &= stream.ReadInt(out mMeshObjectIndex);
            res &= stream.ReadList(out mVertexPosArray);
            res &= stream.ReadList(out mNormalArray, GetVertexCount());
            return(res);
        }
Exemplo n.º 3
0
        public bool LoadFromStream(NullMemoryStream stream)
        {
            Clear();
            bool res = stream.ReadString(out mAnimationName);

            res &= stream.ReadInt(out CurrentVersion);
            res &= stream.ReadInt(out mFrameRate);
            res &= stream.ReadList(out mFrameTimes);
            res &= stream.ReadList(out mNodeAnimationArray);

            return(res);
        }
Exemplo n.º 4
0
        public bool LoadFromStream(NullMemoryStream stream)
        {
            Clear();
            bool res = stream.ReadList(out mFrameArray);

            if (mFrameArray.Count == 0)
            {
                return(res);
            }
            res &= stream.ReadList(out mVertexMorphFrameList, mFrameArray.Count);
            res &= stream.ReadString(out mAnimationName);
            res &= stream.ReadInt(out mFrameRate);
            return(res);
        }
Exemplo n.º 5
0
        public bool LoadFromStream(NullMemoryStream stream)
        {
            Clear();
            bool res = stream.ReadList(out mAnimationArray);

            return(res);
        }
Exemplo n.º 6
0
        public bool LoadFromStream(NullMemoryStream stream)
        {
            Clear();
            bool res = stream.ReadList(out mSocketNodeArray);

            return(res);
        }
        public bool LoadFromStream(NullMemoryStream stream)
        {
            Clear();
            bool res = stream.ReadList(out mVertexMorphObjectList);

            return(res);
        }
Exemplo n.º 8
0
        public bool LoadFromStream(NullMemoryStream stream)
        {
            Clear();
            bool res = stream.ReadString(out mSkeletonName);

            res &= stream.ReadList(out mBindingPieceNodeArray);
            return(res);
        }
Exemplo n.º 9
0
        public bool LoadFromStream(NullMemoryStream stream)
        {
            Clear();
            bool res = stream.ReadInt(out mPieceHandle);

            res &= stream.ReadList(out mBindingNodeArray);
            return(res);
        }
Exemplo n.º 10
0
        public bool LoadFromStream(NullMemoryStream stream)
        {
            Clear();
            bool res = stream.ReadList(out mUVArray);

            if (mUVArray.Count == 0)
            {
                return(res);
            }
            byte b;

            res        &= stream.ReadByte(out b);
            mUVType     = (UVType)b;
            res        &= stream.ReadByte(out b);
            mUVDataType = (NullDataStructType)b;
            return(res);
        }
Exemplo n.º 11
0
        // Use this for initialization
        public void Start()
        {
            string testPath = "test.bytes";

            using (NullMemoryStream stream = NullMemoryStream.WriteToFile(testPath))
            {
                List <Quaternion>         test = new List <Quaternion>();
                Dictionary <int, Vector3> map  = new Dictionary <int, Vector3>();
                for (int i = 0; i < 100; ++i)
                {
                    test.Add(Quaternion.identity);
                    map.Add(i, Vector3.zero);
                }
                Dictionary <int, NullTestData> stds = new Dictionary <int, NullTestData>();
                stds.Add(0, new NullTestData()
                {
                    name = "test1", age = 12, isMale = false, money = 4.6f
                });
                stds.Add(1, new NullTestData()
                {
                    name = "test2", age = 8, isMale = true, money = 48f
                });
                stream.WriteList(test, false);
                stream.WriteMap(map, false);
                stream.WriteMap(stds, false);
            }

            using (NullMemoryStream stream = NullMemoryStream.ReadFromFile(testPath))
            {
                List <Quaternion>              test;
                Dictionary <int, Vector3>      map;
                Dictionary <int, NullTestData> stds;
                stream.ReadList(out test);
                stream.ReadMap(out map);
                stream.ReadMap(out stds);
                Debug.Log("test: " + test.Count + " " + test[0] + " " + test[test.Count - 1]);
                Debug.Log("map: " + map.Count + " " + map[0] + " " + map[map.Count - 1]);
                Debug.Log("stds: " + stds.Count + " " + stds[0].GetKey() + " " + stds[1].GetKey());
            }
        }
Exemplo n.º 12
0
 public bool LoadFromStream(NullMemoryStream stream)
 {
     Clear();
     return(stream.ReadList(out mNodeWeightArray));
 }
Exemplo n.º 13
0
 public bool LoadFromStream(NullMemoryStream stream)
 {
     Clear();
     return(stream.ReadList(out mUVGroupList));
 }
Exemplo n.º 14
0
 public bool LoadFromStream(NullMemoryStream stream)
 {
     Clear();
     return(stream.ReadList(out MeshObjectList));
 }
Exemplo n.º 15
0
 public bool LoadFromStream(NullMemoryStream stream)
 {
     return(stream.ReadList(out mTextureArray));
 }
Exemplo n.º 16
0
 public bool LoadFromStream(NullMemoryStream stream)
 {
     return(stream.ReadList(out mMaterialArray));
 }