Exemplo n.º 1
0
        public Form1()
        {
            Radars = new List <Radar>();

            XDIM      = Properties.Settings.Default.Xdim;
            YDIM      = Properties.Settings.Default.Ydim;
            scanIndex = 0;
#if DOUBLE
            GaussianKernel = new double[GAUSSIANLENGTH];
#else
            GaussianKernel = new uint[GAUSSIANLENGTH];
#endif
            InitializeComponent();
            GAUSSIANSUM = Filter.GenerateKernel(GaussianKernel, GAUSSIANLENGTH, SigmaBar.Value);

            fullBit = GuiUtil.GenerateBitmap(300, XDIM, YDIM);
            BITCOLS = fullBit.Width;
            BITROWS = fullBit.Height;

            radarGraph                = new RadarGraph();
            _async                    = new AsynchronousSocketListener();
            _async.ScanReceived      += async_ScanReceived;
            _async.SetConfigReceived += async_SetConfigReceived;
            _async.GetConfigReceived += async_GetConfigReceived;
            _async.RadarConnected    += async_RadarConnected;
            _async.RadarDisconnected += async_RadarDisconnected;
            Thread t = new Thread(new ThreadStart(_async.StartListening));
            t.Start();
            IPEndPoint ipe = _async.GetEndPoint();
            label3.Text    = ipe.Address.ToString();
            label4.Text    = ipe.Port.ToString();
            RadarXBox.Text = XDIM.ToString();
            RadarYBox.Text = YDIM.ToString();
            _scanTimer     = new System.Threading.Timer(new TimerCallback(ScanTimer_Tick), null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
        }
Exemplo n.º 2
0
 private static void DebugDims()
 {
     Debug.Log(SLICE_WIDTH.ToString());
     Debug.Log("GenerateMesh::CreateSurfaceObjects > Voxel grid dimensions (x,y,z):");
     Debug.Log(XDIM.ToString());
     Debug.Log(YDIM.ToString());
     Debug.Log(ZDIM.ToString());
 }