/// <summary>Writes the specified manifold point value.</summary> /// <param name="packet">The packet.</param> /// <param name="data">The value to write.</param> /// <returns>This packet, for call chaining.</returns> private static IWritablePacket Write(this IWritablePacket packet, ManifoldPoint data) { return(packet .Write(data.LocalPoint) .Write(data.NormalImpulse) .Write(data.TangentImpulse) .Write(data.Id.Key)); }
/// <summary>Reads a ManifoldPoint value.</summary> /// <param name="packet">The packet.</param> /// <param name="result">The read value.</param> /// <returns>The packet, for call chaining.</returns> /// <exception cref="PacketException">The packet has not enough available data for the read operation.</exception> private static IReadablePacket Read(this IReadablePacket packet, out ManifoldPoint result) { result.Id.Feature = new ContactFeature(); return(packet .Read(out result.LocalPoint) .Read(out result.NormalImpulse) .Read(out result.TangentImpulse) .Read(out result.Id.Key)); }