コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: terakenxx/TukubaChallenge
        /// <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);
        }