internal static void ExtractPlanes(PlaneExtractionSettings settings)
        {
            using (var undoBlock = new UndoBlock("Extract Planes"))
            {
                var prefabRoot = settings.gameObject;
                undoBlock.RecordObject(prefabRoot);
                var voxelGenerationParams = settings.VoxelGenerationParams;
                var planeExtractionParams = settings.PlaneFindingParams;
                var voxelSize             = voxelGenerationParams.voxelSize;
                if ((int)(planeExtractionParams.minPointsPerSqMeter * (voxelSize * voxelSize)) <= 0)
                {
                    Debug.LogWarning("Minimum points per voxel is not greater than 0. " +
                                     "Increase either the voxel size or the minimum points per square meter.");
                    return;
                }

                if (!PlaneGenerationModule.TryDestroyPreviousPlanes(prefabRoot, "Extracting Planes", undoBlock))
                {
                    return;
                }

                GenerateVoxelGrids(prefabRoot, voxelGenerationParams, planeExtractionParams);
                FindPlanesInGrids(prefabRoot, undoBlock);
            }
        }