コード例 #1
0
        public static BitWriter WriteLcdAxis(this BitWriter bs, Vector vector)
        {
            VectorSerializer.SerializeLcdAxis(vector, bs);

            return(bs);
        }
コード例 #2
0
        public static BitWriter WriteNearDifference(this BitWriter bs, Vector vector)
        {
            VectorSerializer.SerializeNearDifference(vector, bs);

            return(bs);
        }
コード例 #3
0
        public static BitWriter WriteLinearLongLength(this BitWriter bs, Vector vector)
        {
            VectorSerializer.SerializeLinearLongLength(vector, bs);

            return(bs);
        }
コード例 #4
0
        public static void SerializeNearDifference(Vector vector, BitWriter writerToWrite)
        {
            var nd = (byte)((vector.X + 1) * 9 + (vector.Y + 1) * 3 + (vector.Z + 1) * 1);

            writerToWrite.WriteByte(nd, 4, 5);
        }
コード例 #5
0
 public static void SerializeLinearLongLength(Vector vector, BitWriter writerToWrite)
 {
     writerToWrite.WriteByte((byte)(vector.GetFirstNonZeroComponent() + 15), 4, 5);
 }
コード例 #6
0
 public static void SerializeLinearShortLength(Vector vector, BitWriter writerToWrite)
 {
     writerToWrite.WriteByte((byte)(vector.GetFirstNonZeroComponent() + 5), 3, 4);
 }