Ejemplo n.º 1
0
        private void ConvertPoints()
        {
            int drivers = _trackManager.TrackRecording.TrackDrivers.Count;

            TrackBounds trackBounds = _trackManager.TrackBounds;

            _trackManager.TrackBounds.Width  = Math.Abs(_trackManager.TrackBounds.MinGameX) + Math.Abs(_trackManager.TrackBounds.MaxGameX) + (trackBounds.Margin * 2);
            _trackManager.TrackBounds.Height = Math.Abs(_trackManager.TrackBounds.MinGameY) + Math.Abs(_trackManager.TrackBounds.MaxGameY) + (trackBounds.Margin * 2);

            for (int i = 0; i < drivers; i++)
            {
                List <TrackLap> trackLaps = _trackManager.TrackRecording.TrackDrivers.Find(p => p.Id == i).TrackLaps;

                foreach (TrackLap trackLap in trackLaps)
                {
                    List <TrackPoint> trackPoints = trackLap.TrackPoints;

                    foreach (TrackPoint trackPoint in trackPoints)
                    {
                        trackPoint.X = -trackPoint.GameX + Math.Abs(trackBounds.MaxGameX) + trackBounds.Margin;
                        trackPoint.Y = trackPoint.GameY + Math.Abs(trackBounds.MinGameY) + trackBounds.Margin;
                        trackPoint.Z = trackPoint.GameZ + Math.Abs(trackBounds.MinGameZ);
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public TrackRecording()
 {
     _trackBounds  = new TrackBounds();
     _trackDrivers = new List <TrackDriver>();
 }
Ejemplo n.º 3
0
 public TrackAnalysis()
 {
     AnalysisDrivers = new List<AnalysisDriver>();
     TrackBounds = new TrackBounds(0, 0, 0, 0);
 }