public void Monaco_ObjectShapes() { var trackData = TrackFactsHelper.GetTrackMonaco(); using (var reader = new BinaryReader(MemoryStreamProvider.Open(trackData.Path))) { var objects = ObjectShapesReader.Read(reader, trackData.KnownOffsets.ObjectData); objects.Count.Should().Be(59); objects.First().AllData.Length.Should().Be(1796); objects.Last().AllData.Length.Should().Be(740); } }
public void Monaco_FirstShape_Has_28_ScaleValues() { var trackData = TrackFactsHelper.GetTrackMonaco(); using (var reader = new BinaryReader(MemoryStreamProvider.Open(trackData.Path))) { var objects = ObjectShapesReader.Read(reader, trackData.KnownOffsets.ObjectData); var obj = objects.First(); obj.ScaleValues.Count.Should().Be(28); obj.ScaleValues[0].Should().Be(2860); obj.ScaleValues[27].Should().Be(2199); } }
public void Monaco_DataAndHeader_AreSetCorrectly() { var trackData = TrackFactsHelper.GetTrackMonaco(); using (var reader = new BinaryReader(MemoryStreamProvider.Open(trackData.Path))) { var objects = ObjectShapesReader.Read(reader, trackData.KnownOffsets.ObjectData); objects.First().HeaderIndex.Should().Be(0); objects.First().DataIndex.Should().Be(37); objects.Last().HeaderIndex.Should().Be(58); objects.Last().DataIndex.Should().Be(58); } }
public void Monaco_LastShape_Has_14_Points() { var trackData = TrackFactsHelper.GetTrackMonaco(); using (var reader = new BinaryReader(MemoryStreamProvider.Open(trackData.Path))) { reader.BaseStream.Position = 4110; var objects = ObjectShapesReader.Read(reader, trackData.KnownOffsets.ObjectData); var obj = objects.Last(); obj.Points.Count.Should().Be(14); obj.Points[0].X.Should().Be(5120); obj.Points[0].Y.Should().Be(10752); obj.Points[0].Z.Should().Be(65024); obj.Points[13].X.Should().Be(-3584); obj.Points[13].Y.Should().Be(10752); obj.Points[13].Z.Should().Be(4608); } }