private static GetAndWriteEpoch ( CesiumOutputStream output, IList |
||
output | CesiumOutputStream | The stream to which to write the epoch. |
dates | IList |
The collection of dates from which to determine the epoch. |
startIndex | int | The first index in the collection to use. |
length | int | The number of items from the collection to use. |
return | JulianDate |
private static JulianDate GetAndWriteEpoch(CesiumOutputStream output, IList<JulianDate> dates, int startIndex, int length)
{
if (startIndex < dates.Count)
{
JulianDate epoch = dates[startIndex];
output.WritePropertyName("epoch");
output.WriteValue(CesiumFormattingHelper.ToIso8601(epoch, output.PrettyFormatting ? Iso8601Format.Extended : Iso8601Format.Compact));
return epoch;
}
else
{
return JulianDate.MinValue;
}
}