Exemplo n.º 1
0
 public override void Serialize(MemoryStream stream)
 {
     System.Byte[] positions_len_bytes = BitConverter.GetBytes((System.UInt32)positions.Count);
     stream.Write(positions_len_bytes, 0, positions_len_bytes.Length);
     foreach (double element in positions)
     {
         System.Byte[] element_bytes = BitConverter.GetBytes(element);
         stream.Write(element_bytes, 0, element_bytes.Length);
     }
     System.Byte[] velocities_len_bytes = BitConverter.GetBytes((System.UInt32)velocities.Count);
     stream.Write(velocities_len_bytes, 0, velocities_len_bytes.Length);
     foreach (double element in velocities)
     {
         System.Byte[] element_bytes = BitConverter.GetBytes(element);
         stream.Write(element_bytes, 0, element_bytes.Length);
     }
     System.Byte[] accelerations_len_bytes = BitConverter.GetBytes((System.UInt32)accelerations.Count);
     stream.Write(accelerations_len_bytes, 0, accelerations_len_bytes.Length);
     foreach (double element in accelerations)
     {
         System.Byte[] element_bytes = BitConverter.GetBytes(element);
         stream.Write(element_bytes, 0, element_bytes.Length);
     }
     time_from_start.Serialize(stream);
 }
Exemplo n.º 2
0
 public override void Serialize(MemoryStream stream)
 {
     data.Serialize(stream);
 }