public LRFMapForm(CarSim _carSim,int mapWidth, int mapHeight,double _ScaleToPixel ) { InitializeComponent(); carSim = _carSim; LrfBmp = new Bitmap(mapWidth, mapHeight); ScaleToPixel = _ScaleToPixel; { Graphics g = Graphics.FromImage(LrfBmp); g.FillRectangle(Brushes.Black, 0, 0, mapWidth, mapHeight); g.Dispose(); } //picboxLRF.Image = LrfBmp; //tmr_Update.Enabled = true; }
/// <summary> /// /// </summary> private void SimCarInit() { // クルマの配置の初期状態 MarkPoint carInitPos = new MarkPoint(mapFileData.startPosition.x * ScalePixelToReal, mapFileData.startPosition.y * ScalePixelToReal, mapFileData.startDir); // シムカー生成 carPos = new MarkPoint(carInitPos.X, carInitPos.Y, carInitPos.Theta); carSim = new CarSim(ScalePixelToReal); carSim.CarInit(carInitPos); carSim.MapInit(MapBmp); }