Пример #1
0
        public static DumpItem KV(DumpItem d, string name, IList <Vector3> x)
        {
            var subDI = d.GetOrCreateSubitem(name);

            DumpList(subDI, x);
            return(subDI);
        }
Пример #2
0
        public static DumpItem KV <T>(DumpItem d, string name, IList <T> x) where T : IDumpable
        {
            var subDI = d.GetOrCreateSubitem(name);

            DumpList(subDI, x);
            return(subDI);
        }
Пример #3
0
        public static DumpItem KV(DumpItem d, string name, Vector4 x)
        {
            var subDI = d.GetOrCreateSubitem(name);

            subDI.DumpVector4(x);
            return(subDI);
        }
Пример #4
0
        public static DumpItem KV <T>(DumpItem d, string name, ref T x) where T : IDumpable
        {
            var subDI = d.GetOrCreateSubitem(name);

            x.Dump(subDI);
            return(subDI);
        }
Пример #5
0
        public static DumpItem KV(DumpItem d, string name, byte x)
        {
            var subDI = d.GetOrCreateSubitem(name);
            var tmp   = (Int64)x;

            subDI.DumpInt(tmp);
            return(subDI);
        }
Пример #6
0
        public static DumpItem KV(DumpItem d, string name, bool x)
        {
            var   subDI = d.GetOrCreateSubitem(name);
            Int64 tmp   = x ? 1 : 0;

            subDI.DumpInt(tmp);
            return(subDI);
        }
Пример #7
0
        public static DumpItem KV(DumpItem d, string name, Quaternion x)
        {
            var subDI = d.GetOrCreateSubitem(name);
            var tmp   = new Quaternion(x.X, x.Y, x.Z, x.W);

            subDI.DumpQuaternion(tmp);
            return(subDI);
        }
Пример #8
0
        public static DumpItem KV(DumpItem d, string name, Vector2 x)
        {
            var subDI = d.GetOrCreateSubitem(name);
            var tmp   = new Vector4(x.X, x.Y, 0, 0);

            subDI.DumpVector4(tmp);
            return(subDI);
        }
Пример #9
0
        public static DumpItem KV(DumpItem d, string name, float x)
        {
            var subDI = d.GetOrCreateSubitem(name);
            var tmp   = (double)x;

            subDI.DumpDouble(tmp);
            return(subDI);
        }
Пример #10
0
        public static DumpItem KV(DumpItem d, string name, ref UInt64 x)
        {
            var subDI = d.GetOrCreateSubitem(name);
            var tmp   = (Int64)x;
            var wb    = subDI.DumpInt(ref tmp);

            x = (UInt64)tmp;
            return(subDI);
        }
Пример #11
0
        public static DumpItem KV(DumpItem d, string name, ref Int64 x)
        {
            var subDI = d.GetOrCreateSubitem(name);
            var wb    = subDI.DumpInt(ref x);

            if (wb)
            {
                subDI.OnWriteBackAction?.Invoke();
            }
            return(subDI);
        }
Пример #12
0
        public static DumpItem KV(DumpItem d, string name, ref byte x)
        {
            var   subDI = d.GetOrCreateSubitem(name);
            Int64 tmp   = x;
            var   wb    = subDI.DumpInt(ref tmp);

            x = (byte)tmp;
            if (wb)
            {
                subDI.OnWriteBackAction?.Invoke();
            }
            return(subDI);
        }
Пример #13
0
        public static DumpItem KV(DumpItem d, string name, ref Quaternion x)
        {
            var subDI = d.GetOrCreateSubitem(name);
            var tmp   = new Quaternion(x.X, x.Y, x.Z, x.W);
            var wb    = subDI.DumpQuaternion(ref tmp);

            x = new Quaternion(tmp.X, tmp.Y, tmp.Z, tmp.W);
            if (wb)
            {
                subDI.OnWriteBackAction?.Invoke();
            }
            return(subDI);
        }
Пример #14
0
        public static DumpItem KV(DumpItem d, string name, ref Vector2 x)
        {
            var subDI = d.GetOrCreateSubitem(name);
            var tmp   = new Vector4(x.X, x.Y, 0, 0);
            var wb    = subDI.DumpVector4(ref tmp);

            x = new Vector2(tmp.X, tmp.Y);
            if (wb)
            {
                subDI.OnWriteBackAction?.Invoke();
            }
            return(subDI);
        }
Пример #15
0
        public static DumpItem KV(DumpItem d, string name, ref float x)
        {
            var subDI = d.GetOrCreateSubitem(name);
            var tmp   = (double)x;
            var wb    = subDI.DumpDouble(ref tmp);

            x = (float)tmp;
            if (wb)
            {
                subDI.OnWriteBackAction?.Invoke();
            }
            return(subDI);
        }