public void DrawTeam() { //XyDataSeries<double, double> lidarPts = new XyDataSeries<double, double>(); ObjectsPolygonSeries.Clear(); foreach (var r in TeamMatesDisplayDictionary) { //Affichage des robots RobotGhostSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Ghost, TeamMatesDisplayDictionary[r.Key].GetRobotGhostPolygon()); PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Speed, TeamMatesDisplayDictionary[r.Key].GetRobotSpeedArrow()); PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Destination, TeamMatesDisplayDictionary[r.Key].GetRobotDestinationArrow()); PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.WayPoint, TeamMatesDisplayDictionary[r.Key].GetRobotWaypointArrow()); //On trace le robot en dernier pour l'avoir en couche de dessus RobotShapesSeries.AddOrUpdatePolygonExtended(r.Key, TeamMatesDisplayDictionary[r.Key].GetRobotPolygon()); AddOrUpdateTextAnnotation(r.Key.ToString(), r.Value.robotName, TeamMatesDisplayDictionary[r.Key].GetRobotLocation().X, TeamMatesDisplayDictionary[r.Key].GetRobotLocation().Y); AddOrUpdateTextAnnotation(r.Key.ToString() + "Role", r.Value.robotRole.ToString(), TeamMatesDisplayDictionary[r.Key].GetRobotLocation().X, TeamMatesDisplayDictionary[r.Key].GetRobotLocation().Y - 1.4); AddOrUpdateTextAnnotation(r.Key.ToString() + "Console", r.Value.DisplayMessage.ToString(), TeamMatesDisplayDictionary[r.Key].GetRobotLocation().X, TeamMatesDisplayDictionary[r.Key].GetRobotLocation().Y - 1.9); ////Rendering des objets Lidar //foreach (var polygonObject in TeamMatesDisplayDictionary[r.Key].GetRobotLidarObjects()) // ObjectsPolygonSeries.AddOrUpdatePolygonExtended(ObjectsPolygonSeries.Count(), polygonObject); } foreach (var r in OpponentDisplayDictionary) { //Affichage des robots adverses PolygonSeries.AddOrUpdatePolygonExtended(r.Key, OpponentDisplayDictionary[r.Key].GetRobotPolygon()); } }
public void DrawGhost() { XyDataSeries <double, double> lidarPts = new XyDataSeries <double, double>(); ObjectsPolygonSeries.Clear(); //Affichage du robot PolygonSeries.AddOrUpdatePolygonExtended(4, GhostDisplay.GetRobotPolygon()); PolygonSeries.AddOrUpdatePolygonExtended(5, GhostDisplay.GetRobotSpeedArrow()); PolygonSeries.AddOrUpdatePolygonExtended(6, GhostDisplay.GetRobotDestinationArrow()); PolygonSeries.AddOrUpdatePolygonExtended(7, GhostDisplay.GetRobotWaypointArrow()); //Rendering des points Lidar lidarPts.AcceptsUnsortedData = true; var lidarData = GhostDisplay.GetRobotLidarPoints(); lidarPts.Append(lidarData.XValues, lidarData.YValues); //Rendering des objets Lidar foreach (var polygonObject in GhostDisplay.GetRobotLidarObjects()) { ObjectsPolygonSeries.AddOrUpdatePolygonExtended(ObjectsPolygonSeries.Count(), polygonObject); } //Affichage des points lidar LidarPoints.DataSeries = lidarPts; }
public void UpdateWorldMapDisplay() { DrawBalls(); DrawTeam(); PolygonSeries.RedrawAll(); RobotGhostSeries.RedrawAll(); RobotShapesSeries.RedrawAll(); ObjectsPolygonSeries.RedrawAll(); BallPolygon.RedrawAll(); }
private void TimerAffichage_Tick(object sender, EventArgs e) { DrawBall(); DrawRobot(); DrawGhost(); DrawLidar(); PolygonSeries.RedrawAll(); ObjectsPolygonSeries.RedrawAll(); BallPolygon.RedrawAll(); }
private void TimerAffichage_Tick(object sender, EventArgs e) { DrawBall(); DrawTeam(); //DrawLidar(); if (TeamMatesDisplayDictionary.Count == 1) //Cas d'un affichage de robot unique (localWorldMap) { DrawHeatMap(TeamMatesDisplayDictionary.First().Key); } PolygonSeries.RedrawAll(); ObjectsPolygonSeries.RedrawAll(); BallPolygon.RedrawAll(); }
public void DrawTeam() { XyDataSeries <double, double> lidarPts = new XyDataSeries <double, double>(); ObjectsPolygonSeries.Clear(); foreach (var r in TeamMatesDisplayDictionary) { //Affichage des robots PolygonSeries.AddOrUpdatePolygonExtended(r.Key, TeamMatesDisplayDictionary[r.Key].GetRobotPolygon()); PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Speed, TeamMatesDisplayDictionary[r.Key].GetRobotSpeedArrow()); PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Destination, TeamMatesDisplayDictionary[r.Key].GetRobotDestinationArrow()); PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.WayPoint, TeamMatesDisplayDictionary[r.Key].GetRobotWaypointArrow()); //Rendering des points Lidar lidarPts.AcceptsUnsortedData = true; var lidarData = TeamMatesDisplayDictionary[r.Key].GetRobotLidarPoints(); lidarPts.Append(lidarData.XValues, lidarData.YValues); //Rendering des objets Lidar foreach (var polygonObject in TeamMatesDisplayDictionary[r.Key].GetRobotLidarObjects()) { ObjectsPolygonSeries.AddOrUpdatePolygonExtended(ObjectsPolygonSeries.Count(), polygonObject); } } foreach (var r in OpponentDisplayDictionary) { //Affichage des robots PolygonSeries.AddOrUpdatePolygonExtended(r.Key, OpponentDisplayDictionary[r.Key].GetRobotPolygon()); //PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Speed, OpponentDisplayDictionary[r.Key].GetRobotSpeedArrow()); //PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Destination, TeamMatesDictionary[r.Key].GetRobotDestinationArrow()); //PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.WayPoint, TeamMatesDictionary[r.Key].GetRobotWaypointArrow()); } //Affichage des points lidar LidarPoints.DataSeries = lidarPts; }