Пример #1
0
        public void Create()
        {
            int   no_of_grids           = 2;
            int   grid_type             = metagrid.TYPE_SIMPLE;
            int   dimension_mm          = 3000;
            int   dimension_vertical_mm = 2000;
            int   cellSize_mm           = 32;
            int   localisationRadius_mm = 2000;
            int   maxMappingRange_mm    = 2000;
            float vacancyWeighting      = 0.5f;

            metagridBuffer buffer =
                new metagridBuffer(
                    no_of_grids,
                    grid_type,
                    dimension_mm,
                    dimension_vertical_mm,
                    cellSize_mm,
                    localisationRadius_mm,
                    maxMappingRange_mm,
                    vacancyWeighting);

            Assert.AreNotEqual(null, buffer);
            Assert.AreNotEqual(null, buffer.buffer);
            Assert.AreEqual(2, buffer.buffer.Length);
            Assert.AreNotEqual(null, buffer.buffer[0]);
            Assert.AreNotEqual(null, buffer.buffer[1]);

            buffer.Reset();
        }
Пример #2
0
 public void ResetPath()
 {
     buffer.Reset();
     if ((current_path_filename != null) &&
         (current_path_filename != ""))
     {
         overall_map_img = null;
         buffer.LoadPath(
             current_path_filename,
             current_disparities_index_filename,
             current_disparities_filename,
             ref overall_map_dimension_mm,
             ref overall_map_centre_x_mm,
             ref overall_map_centre_y_mm);
     }
 }