Example #1
0
        private static void PersistMatrix4x3Impl(this StatePersister persister, ref Matrix4x3 value, bool readVersion)
        {
            if (readVersion)
            {
                persister.PersistVersion(1);
            }

            var m11 = value.M11;

            persister.PersistSingle(ref m11);

            var m21 = value.M21;

            persister.PersistSingle(ref m21);

            var m31 = value.M31;

            persister.PersistSingle(ref m31);

            var m41 = value.M41;

            persister.PersistSingle(ref m41);

            var m12 = value.M12;

            persister.PersistSingle(ref m12);

            var m22 = value.M22;

            persister.PersistSingle(ref m22);

            var m32 = value.M32;

            persister.PersistSingle(ref m32);

            var m42 = value.M42;

            persister.PersistSingle(ref m42);

            var m13 = value.M13;

            persister.PersistSingle(ref m13);

            var m23 = value.M23;

            persister.PersistSingle(ref m23);

            var m33 = value.M33;

            persister.PersistSingle(ref m33);

            var m43 = value.M43;

            persister.PersistSingle(ref m43);

            if (persister.Mode == StatePersistMode.Read)
            {
                value = new Matrix4x3(
                    m11, m12, m13,
                    m21, m22, m23,
                    m31, m32, m33,
                    m41, m42, m43);
            }
        }
Example #2
0
        public static void PersistLogicFrame(this StatePersister persister, ref LogicFrame value, [CallerArgumentExpression("value")] string name = "")
        {
            persister.PersistFieldName(name);

            persister.PersistLogicFrameValue(ref value);
        }
Example #3
0
        public static void PersistObjectID(this StatePersister persister, ref uint value, [CallerArgumentExpression("value")] string name = "")
        {
            persister.PersistFieldName(name);

            persister.PersistObjectIDValue(ref value);
        }
Example #4
0
 public static void PersistFrameValue(this StatePersister persister, ref uint value) => persister.PersistUInt32Value(ref value);
Example #5
0
 public void Persist(StatePersister persister)
 {
     persister.PersistAsciiString(ref Name);
     persister.PersistObjectID(ref ObjectId);
 }